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

Bug#210598: libc6.1: Operations on subnormal floating-point numbers generate a floating point exception



On Sat, Sep 13, 2003 at 10:21:39AM +0200, Vincent Lefevre wrote:
> On 2003-09-12 21:43:57 -0400, Daniel Jacobowitz wrote:
> > This is not a glibc problem.  It's not the call to fprintf which is
> > faulting.  It's the addition of 1.0 to a denormal.
> 
> I know, but I thought that either the subnormals should have been
> treated in software by the libc, or the ldexp function should have

That would require a signal handler trapping FP exceptions - quite
slow, and defeats the whole purpose of supporting the non-IEEE mode,
which is faster.

> avoided returning a subnormal in non-IEEE754 mode (this may make
> sense, as 1e-1038 seems to be evaluated to 0).

I don't think glibc can even tell.  From libc/sysdeps/alpha/Makefile:

# For now, build everything with full IEEE math support.
# TODO: build separate libm and libm-ieee.
sysdep-CFLAGS += -mieee

i.e. all of libc is built in IEEE mode anyway.

> > > I completely disagree. I care about the C standard, and I explicitely
> > > say so with the -std=c99 option. Perhaps things like -std=c99 should
> > > imply -mieee then, if no change is done in glibc (and __STDC__
> > > shouldn't be defined if no such option is used).
> > 
> > Raise that with the Alpha compiler maintainer, Richard Henderson.
> 
> So, do you think that this bug should be reassigned to the gcc-3.2
> package (since I use gcc 3.2)?

I suppose.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer



Reply to: