Information générale
Catégorie:
Codage, syntaxe et commandes
>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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement