Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why not 1*(0.5-0.4-0.1) = 0?
Message
De
07/01/2005 03:52:11
 
 
À
06/01/2005 23:34:32
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Database:
MS SQL Server
Divers
Thread ID:
00974881
Message ID:
00974985
Vues:
40
>>With ANY decimal numbers you will have some rounding errors. Sometimes the programs masks the error, and you get the result you want, and sometimes you get the wrong value, there's simply no way to avoid that.
>
>Not quite correct. The following set of decimals (plus any integer part) has an exact representation in binary: 0.5, 0.25, 0.75, 0.125, 0.375, 0.625, 0.875, ... i.e. those that can be expressed as m/2**n.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform