Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Diff. between Numeric with precision, Currency and Doubl
Message
De
10/06/2003 10:25:47
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivie
 
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:
00798369
Vues:
32
This message has been marked as a message which has helped to the initial question of the thread.
>Hi Fabio
>
>I did run the code, what really happens. I browsed and I see a 3.0. I guess I am slow to understand, please tell me the reasons.

Double-precision numbers are stored internally in a binary format, and with the format of a number in scientific notation; one bit for the sign, so many bits for the exponent (base 2), so many bits for the mantissa (base 2). There are 15 significant digits, but there can be some rounding errors in the last digits.

>And is double advisable to use?

I have no personal experience with this, but I believe the rounding errors will cause you trouble, but only occasionaly.
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform