Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
More then 15 places past decimal??
Message
From
17/01/2002 08:42:27
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00605696
Message ID:
00606027
Views:
26
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform