Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
More then 15 places past decimal??
Message
De
17/01/2002 08:42:27
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00605696
Message ID:
00606027
Vues:
30
>Yeah, I looked at that but it only allows up to 28 digits of precision... Thanks though.

Kevin --

If you need to "roll your own" and need speed, fixed point arithmetic algorithms would probably fit your need.

I'd approach it like this.

Determine the largest value that VFP can represent in whole numbers.
Use that as the equivalent of a byte.
Look at algorithms for fixed point arithmetic (common in assembly language and forth) and map the VFP maxnum to byte for calcs.

You'll have to think in terms of carries. For example adding 2 VFP maxnums at the lowest "byte" means a carry to the next highest "byte".

The usual operations, plus MOD will provide the info you need for carries and fractional values.

Best wishes!

Jay
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform