>Dear All
>
>Is there any way to make precise calculation without number being rounded
>
>? 22919090710007290*100/97
>
>Returns rounded number. I need actual remainder.
>Mod(22919090710007290*100,97) returns 0
>
>What are the options.
>
>TIA
>Sergio
Visual FoxPro's built-in calculations use a fixed number of significant digits - about 15 or 16. Even when you are only approaching that limit, there may be rounding errors, due to the conversion between decimal and binary - since the computer internally does calculations in binary..
You can do calculations on strings of numbers, one digit at a time, using the well-known algorithms of addition, subtraction, etc., but the result would be much slower. In any case, it is thus possible to have arbitrary precision.
See my download #
10044, which does all that.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)