Definition of the category Sets In the category Sets consider the object (i.e., set) $A$ defined as the positive real numbers, another object (set) $B$ defined as the negative reals, and a function $f$ defined as the negative square root.  So, $f(25)=-5$ and $f(9)=-3$ , etc.
Now define a functor $F$ from Sets to Sets such that $F(A)=-A$, $F(B)=-B$, and $F(f)=f$.
Strangely, we now we have a "function" that takes the negative square root of a negative number and gives a positive real number.  This is clearly impossible in any normal sense of sets and functions.
As stated in Wikipedia, "the category Set is the category whose objects are Sets.  The arrows or morphisms between sets $A$ and $B$ are all triples $(f,A,B) $ where $f$ is a function from $A$ to $B$."
Here is my problem: The functor above from Sets to Sets shows that f need NOT be a function from one set to another set (because the negative square root function cannot map a negative number to the positive reals).  All this violates the definition of the category Sets, and/or the definition of a function, and/or the definition of a set (of numbers).
What am I doing wrong?  Is $F$ not a functor?  (And if not, how would I be able to tell it's not a valid functor?)
EDIT:  Let me restate the second part of my question (in parentheses above), since it has not been answered so far:  Suppose we have a given category $D$ and we are given a pair of functions (f,g) where the domain of f is the objects of $D$ and the domain of g is the arrows of $D$.  This pair may, or may not, constitute a functor from $D$ to some other (unspecified) category.  
My question concerns what methods/tests/procedures one can use to determine whether such a pair of functions constitutes a functor, or not.  (Perhaps no general methods exist, or perhaps the question is too broad, but if that is the case, then that should be the answer to my question.)
 A: $F$ is not a functor. By definition of a functor, $F(f)$ should be a map from $F(A)$ to $F(B)$ i.e.
$$F(f): F(A) \rightarrow F(B)$$
$f:A\rightarrow B$ cleary doesn't satisfy this as $F(A) = -A \neq A$ and same for $B$, so you cannot have $F(f)=f$ if $F$ is a functor
A: Here is a category D and a functor F that allows the kind of "nonsense" morphisms/functions I was trying to demonstrate in my example.  (Thanks to Jens' comments I can see that Sets was not the right choice for the codomain since that implies morphisms must be functions.)
Let D be a 3 object category with A={25}, B={-5}, and C={-10}. We define f:A$\rightarrow$B where f is the negative square root function.  Also g:B$\rightarrow$C where g(x)=2x.  
Now consider the following functor that maps D to its dual: Let the functor F map A to C, B to B, C to A, f to g, and g to f.  This means that in the dual, F(g)=f: -5 $\rightarrow$ 25.  But by definition f is a function that takes the negative square of its argument, so how can f=F(g) take -5 to 25? Obviously this does not make sense in our "normal" way of thinking about functions.  
This shows that F(g)=F(A)$\rightarrow$F(B) does not have to be "reasonable" because here we have f=F(g):-5 $\rightarrow$ 25.
