*To*: Mark Dickinson <dickinsm@gmail.com>*Cc*: debian-alpha@lists.debian.org*Subject*: Re: libm problems: log(9.8813129168249309e-324) = -infinity*From*: lsorense@csclub.uwaterloo.ca (Lennart Sorensen)*Date*: Fri, 9 May 2008 16:48:56 -0400*Message-id*: <20080509204856.GP6955@csclub.uwaterloo.ca>*In-reply-to*: <loom.20080509T195252-338@post.gmane.org>*References*: <loom.20080509T195252-338@post.gmane.org>

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: > > http://www.python.org/dev/buildbot/3.0/alpha%20Debian%203.0 > > 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 > -Wstrict-prototypes > > 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. -- Len Sorensen

**Follow-Ups**:**Re: libm problems: log(9.8813129168249309e-324) = -infinity***From:*Mark Dickinson <dickinsm@gmail.com>

**References**:**libm problems: log(9.8813129168249309e-324) = -infinity***From:*Mark Dickinson <dickinsm@gmail.com>

- Prev by Date:
**libm problems: log(9.8813129168249309e-324) = -infinity** - Next by Date:
**Re: libm problems: log(9.8813129168249309e-324) = -infinity** - Previous by thread:
**libm problems: log(9.8813129168249309e-324) = -infinity** - Next by thread:
**Re: libm problems: log(9.8813129168249309e-324) = -infinity** - Index(es):