Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Str() how many decimal places can I be sure of
Message
De
03/01/2002 07:49:43
Alexandre Palma
Harms Software, Inc.
Alverca, Portugal
 
 
À
03/01/2002 07:37:53
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00600182
Message ID:
00600199
Vues:
18
This message has been marked as the solution to the initial question of the thread.
Hi Simmon you can also try STR(85.74,32,14) this will return 85.73999999999999
but if you issue TRANSFORM(85.74, REPLICATE("9", 17) + "." + REPLICATE("9", 14)) this will give the correct result.

>Hi Alexandre
>
>Do you know why issuing a STR(85.76,32,14) gives me
>" 85.76000000000001" I want to know where the spurious 1 is coming from at the end. I'm sure I've read something somewhere about the limited accuracy of decimal places when converting to a string but I can't remember where
>
>Thanks
>
>Simon
Alexandre Palma
Senior Application Architect
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform