>hi,
>just a quick query as to what is the fastest way to get a negative of a specified number.
>is it
>x = 7
>x * (-1)
>OR
>x = 7
>0 - x
Really don't have the time or inclination to write a test over a few microseconds... I'm jumping in here because I'm amazed that nobody tried the simple -x.
I mean, haven't you guys ever written a line like this?
y=-x
(update: I see that Fabio did. It was just absent from the rest of the thread.)