Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Round() Bug
Message
From
04/01/2001 16:55:07
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00459503
Message ID:
00459578
Views:
24
>The maximum number of decimals [from TRANSFORM], BTW, is 12, as I just found.

See what you get with the following. It would suggest that the limit is 17 - sixteen significant digits plus the decimal point.
tnnumber=2.0000000056984984924892482948294829
?transform(tnnumber)  && 2.000000005698499
?len( transform( tnNumber))  && 17

tnnumber=2.123456789012345678  && 1 to the left, 18 to the right
?transform(tnnumber)  && 2.123456789012346 - note the rounding
?len( transform( tnNumber))  && 17

tnnumber=22.123456789012345678  && 2 to the left, 18 to the right
?transform(tnnumber)  && 22.12345678901234 - no rounding here - why not??
?len( transform( tnNumber))  && 17

tnnumber=123456789.123456789  && 9 to the left and 9 to the right
?transform(tnnumber)  && 123456789.1234568
?len( transform( tnNumber))  && 17
Rick Borup, MCSD

recursion (rE-kur'-shun) n.
  see recursion.
Previous
Reply
Map
View

Click here to load this message in the networking platform