libm-i387 bug?

Ulrich Drepper drepper@cygnus.com
Fri Jul 17 21:13:00 GMT 1998


Zack Weinberg <zack@rabi.phys.columbia.edu> writes:

> This test program prints "-1.949464 0.000000". Shouldn't it print
> "0.000000 1.000000" ?
> 
> zw
> 
> #include <math.h>
> #include <stdio.h>
> 
> int main(void)
> {
>   printf("%f %f", fdim(2.0, 3.0), fdim(3.0, 2.0));
>   return 0;
> }

Did you defined _GNU_SOURCE?  I get (with the i686 implementation of
these functions) the correct result.

-- 
---------------.      drepper at gnu.org  ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Cygnus Solutions `--' drepper at cygnus.com   `------------------------



More information about the Libc-hacker mailing list