Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calculations with number of precision more than 16
Message
 
À
07/08/2001 09:28:28
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00540608
Message ID:
00540670
Vues:
17
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform