Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Faster (0 - num) or (num * -1)
Message
De
20/11/2003 16:25:26
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00851967
Message ID:
00852085
Vues:
14
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform