Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to obtain maximum numeric value ?
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00901754
Message ID:
00902903
Views:
15
Hi Dawa,

Thanks for your reply, but I needed a way to find out for variable field length, not a fixed length and also to check out for any type of field, like currencry or numeric or integer or double or float, etc.

But actually, I ended up added a fixed maximum value in the form validation as a value higher than that maximum value for this field is completely nonsense! Much simpler and still efficient!

Thanks,
Sylvain Bujold

>Sylvain,
>
>Check out the system capacities in the VFP HELP, just type "system capacities" in the index field,
>then you should see:
>
>Minimum value of an integer -2,147,483,647
> Maximum value of an integer 2,147,483,647
> Digits of precision in numeric computations
>Visual FoxPro can handle numbers up to 9007199254740992 (2^53) in exact computations. 16
> 64 bits = 8 bytes
>Largest number = 10 ^ 308 = 2 ^ 1023 -> 10 bits per
> exponent + 1 for exp sign plus 1 for the number's sign => 12 bits.
>Leaving 52 bits for the mantissa + 1 for implied normalized bit -> 53 bits
>LOG10(2^53) = 15.95 decimal digits accuracy.
>
>Hope this helps,
>
>Dawa
>
>>Hi,
>>
>>Is there a way to find out the maximum possible value of a numeric, float or double variable length field so that I can prevent a numeric overflow error ? That's in a web-based application so I can't bind the field to the control. It seems pretty simple at first but I haven't found a reliable way to do so.
>>
>>Thanks,
>>Sylvain Bujold
>>eMAINT Enterprises
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform