Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Str() how many decimal places can I be sure of
Message
From
03/01/2002 07:49:43
Alexandre Palma
Harms Software, Inc.
Alverca, Portugal
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00600182
Message ID:
00600199
Views:
19
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform