Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calculating very large numbers
Message
De
09/09/2009 09:59:15
 
 
À
09/09/2009 09:05:22
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01423218
Message ID:
01423263
Vues:
68
>>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.

Great ! Thank you All.
I am sure this will suffice.
*****************
Srdjan Djordjevic
Limassol, Cyprus

Free Reporting Framework for VFP9 ;
www.Report-Sculptor.Com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform