Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calculations with number of precision more than 16
Message
 
To
07/08/2001 09:28:28
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00540608
Message ID:
00540670
Views:
21
Hilmar,

>What does the second example do - the one with the empty operator?
It makes addition. "+" is everywhere by default, so it may be skipped.

>I would suggest the following enhancements:

>1) Extend the concept to multiplication and division. The algorithm is more >complicated, of course, than addition or subtraction, and the calculations >would be slow if you multiply, say, two 500-digit numbers. Ask me if you need >details on the algorithm. The basic idea, of course, is to apply the >multiplication algorithm you learned in primary school. Intermediate results >have to be stored - and incremented - in arrays or something similar.

It seems you already did it. If so, did you post it somewhere? I would not post my ymore16 if I saw something similar.

>2) Instead of limiting to 16 decimals digits, you might provide an (optional) >parameter for the number of digits in the result. Let's say that the default >remains at 16 - this would seem a reasonable default to me. I mean, if you >scan a text one byte at a time, there is no need to arbitrarily limit the >input and the results to 16 decimals.

Actually I am doubting that calculations with precision more than 16 will be useful. Just current situation with economy/monetary system in some countries forces to extend the precision limit.

Thank you for your replay.

Yuri
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform