[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 Fri, Sep 12, 2003 at 02:15:30PM +0200, Vincent Lefevre wrote:
> Package: libc6.1
> Version: 2.3.1-16
> Severity: normal
> 
> Consider the following program:
> 
> #include <stdio.h>
> #include <math.h>
> int main (void)
> {
>   double x = ldexp (1.0, -1038);
>   fprintf (stderr, "%g\n", x);
>   fprintf (stderr, "%g\n", x + 1.0);
>   return 0;
> }
> 
> When compiled and run, I get:
> 
> $ ./tst
> 3.39519e-313
> zsh: floating point exception (core dumped)  ./tst

That's life on Alpha.  I believe you can get different behavior by
compiling with -mieee, does that work?

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer



Reply to: