in reply to Re: Filthy Floats
in thread Filthy Floats
Floating point numbers simply cannot be stored precisely on a computer. And the most efficient representations to use do not round off to nice-looking numbers in base 10. So what is probably happening is that Access is storing the floating point number as a float. Perl stores it as a double. And since Perl stores it with much more accuracy than it was stored in the database with, when you display it in Perl you can see the round-off error.
UPDATE
merlyn is of course right. There are a finite number
of exceptions. How many and what they are depends on the
particular hardware you have, and the particular physical
representation of a floating point number that you choose
to use.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re (tilly) 2: Filthy Floats
by merlyn (Sage) on Jul 16, 2001 at 23:37 UTC | |
by spudzeppelin (Pilgrim) on Jul 17, 2001 at 21:50 UTC |