Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Faster (0 - num) or (num * -1)
Message
From
20/11/2003 16:25:26
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00851967
Message ID:
00852085
Views:
15
>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.)

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform