Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Ought not be naught
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Ought not be naught
Divers
Thread ID:
00623523
Message ID:
00623523
Vues:
40
Hi All,

VFP thinks 1.0e-23 = 0. And continues to think any smaller number as well.

This seems to be an operator problem rather than a storage problem.

? log10(1.0e-23) && prints -23 as expected
? log10(1e-300) && prints -300 as expected
? log10(1e-323) && prints -323.005185347451800000, wrong, but understandable
? log10(1e-324) && chokes, thinks the argument is 0 (also understandable)

So, apart from wrapping a call to log10 in an error handler, does anyone know how I might differentiate say... 1.0e-99 from zero? I'm open to text transformations if needed.

But would like to avoid anything that relies on TRANSFORM() because that function has changed its behaviour between VFP 6 and 7.

Related: Does anyone know how to adjust VFP's system eps? Or, even what it is (the results above seem to indicate it depends on the operation/function at hand).

-lc
-lc
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform