Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calculating very large numbers
Message
From
09/09/2009 09:59:15
 
 
To
09/09/2009 09:05:22
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP1
Miscellaneous
Thread ID:
01423218
Message ID:
01423263
Views:
69
>>Dear All
>>
>>Is there any way to make precise calculation without number being rounded
>>
>>? 22919090710007290*100/97
>>
>>Returns rounded number. I need actual remainder.
>>Mod(22919090710007290*100,97) returns 0
>>
>>What are the options.
>>
>>TIA
>>Sergio
>
>Visual FoxPro's built-in calculations use a fixed number of significant digits - about 15 or 16. Even when you are only approaching that limit, there may be rounding errors, due to the conversion between decimal and binary - since the computer internally does calculations in binary..
>
>You can do calculations on strings of numbers, one digit at a time, using the well-known algorithms of addition, subtraction, etc., but the result would be much slower. In any case, it is thus possible to have arbitrary precision.
>
>See my download #10044, which does all that.

Great ! Thank you All.
I am sure this will suffice.
*****************
Srdjan Djordjevic
Limassol, Cyprus

Free Reporting Framework for VFP9 ;
www.Report-Sculptor.Com
Previous
Reply
Map
View

Click here to load this message in the networking platform