Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Diff. between Numeric with precision, Currency and Doubl
Message
De
11/06/2003 16:51:55
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
 
À
11/06/2003 11:06:28
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00798235
Message ID:
00799129
Vues:
33
>Hi Hilmar,
>
>
>Read Thread #798893 and comment it.
>
>10000000 sum get a computation error.
>
>Surprise, SUM(N(X,Y)) is done with float computation !
>
>I can't do computation on VFP.
>I have lost the confidence.
>
>I rewrite my code for do all computation on MSQL.
>
>VFP only show end edit data.
>
>Thanks.

Computations with floating-point are fraught with a certain degree of uncertainty or imprecision in any programming language. This appears whenever you approach the limit of 15-16 significant digits. Unfortunately, unlike some other languages, it is difficult to force VFP to do calculations with integer values.

On the other hand, it is well-known that transform() has problems with certain numbers.
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)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform