[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1732: Bad arithmetic in new perl packages

: Fernando wrote to debian-bugs:
: > Pakckage: perl
: > Version: 5.001-5
: (perl5-porters, this is 5.001m without additional packages).
: > Notes: tried a.out only, happens also with 5.001-4, however 5.001-3 is OK
: (5.001-3 == 5.001e).
: > Perl seems to be confused making some arithmetic operations (additions).
: > Sometimes the result of $a+=$b, when $a is 0 and $b is 2 happens to be
: > 2.000004192 or something similar.
: Fernando, I unfortunately have no idea what is causing this. Please
: provide a short script which shows this behaviour (reliably if possible).
: Perl5-porters, is this a known bug?

No.  Another possibility is that the compiler is using single-precision
instead of double-precision floats.  I think you get about 7 digits of
accuracy in single precision.


Reply to: