Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Bugs with literal double-precision floating-point number
Message
De
02/12/2003 02:34:26
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00852922
Message ID:
00854919
Vues:
32
>>Sorry to but in, Dave, but isn't a picometer per picosecond the same as a meter per second?
>
>Mike
>
>10 pm/psec = 0.01 nm/nsec = 0.00001 um/usec = 0.00000001 mm/msec = 0.00000000001 m/sec. So saying pm/ps is just a way of getting rid of some zeros.

Beg to differ here, if 1 mm/ms= 1* (0.001m)/(0.001s), then we can short out the 0.001 and we get 1mm/ms=1m/s.

>As another example measuring the distance from Austin TX to Cambridge MA (1995.94 miles according to Mapquest) in km accurate to 15 significant digits would need to be expressed as 3212.xxxxxxxxxxx km where the last 2 Xs are nanometers so that's accurate to 10 nanometers. Which is clearly impossible, it's on the order of a million times more accurate than a distance that long can be measured.

For distances and any other earthly physical measurement it's true - 15 significant digits is too much. I don't think we have any means of measuring anything with such precision (maybe time - 1e15 milliseconds is 31688.96 years).

Except money. Within the same monetary system, there's trillions of dollars, and retail gas prices ending in tenths of a cent. Try adding trillions (i.e. $1e12 - I'm speaking of American trillions, which would be European billions), as soon as you get into hundreds of them, you start losing cents.

I've had this in 1993, with the roaring hyperinflation of the time. A moderate amount of money (transportation reimbursement for a dozen employees) was awarded retroactively and expressed in currency-du-jour. Accountants wanted it to be posted at the date when they should have received it in the first place, which was few million percent of inflation before, and the currency has lost six digits since then. The resulting amount had nineteen integer digits (still within storage capacity of FPD2.6, max was 20.0 or 19.1), but then we lost three lower digits, and none of the reports balanced anymore - each differed by an amount of 10^3 magnitude. If I removed this amount, they balanced.
The solution - we dated this amount to the day after the six zeros were cut off, and everything balanced perfectly.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform