Re: libm problems: log(9.8813129168249309e-324) = -infinity
On Fri, May 09, 2008 at 08:12:45PM +0000, Mark Dickinson wrote:
> I've encountered what seems to be a math library bug in
> Debian unstable running on an alpha machine. I'd like to
> file a bug report, but the big problem is that I don't have
> access to the machine itself: it's a Python buildbot:
> I can't even get much information about the hardware
> or software: the host information is given as: "Alpha
> build daemon running Debian unstable" which doesn't
> pin things down much.
> So my question is: (1) can anyone else reproduce the
> problem?, and (2) if so, which versions of gcc, glibc,
> and what exact hardware are they using.
> Details of the failure: it seems that log(9.88e-324) is
> returning -infinity, instead of the correct value of
> around -743.75. 9.88e-324 is an IEEE subnormal value,
> so one might expect problems given that alpha doesn't
> have full hardware support for operations with subnormal
> values, but my understanding is that the libm should be
> fully IEEE 754 compliant, and if C code is compiled with
> the -mieee flag to gcc then everything should work as
> expected. The C flags in use are:
> -pthread -c -fno-strict-aliasing -mieee -g -Wall
> I regret that I can't produce a minimal failing code
> example, since I don't run Debian and have no direct
> access to an alpha machine. If anyone has access to
> an alpha machine and is feeling brave, they could check
> out the latest Python version from svn.python.org (trunk
> or py3k branch---it doesn't matter which), and verify
> that after ./configure && make && make test, test_math
> is failing.
> Any hints about tracking down the source of this problem
> would be much appreciated.
Which kernel version are you running? Is it the Debian kernel package?
Which CPU do you have?
Some kernel versions left out the MATH_EMU option on alpha in Debian,
and older CPUs are not IEEE compliant if the math_emu module isn't
loaded (or built in) while newer ones are. Things like rounding seem to
behave differently for example.