This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: libm-i387 bug?


> From: Andreas Jaeger <aj@arthur.rhein-neckar.de>
> Date: 16 Jul 1998 09:26:11 +0200

> In what kind of trap did both of us fall?
> Andreas
> 

Probably this one:

#define _GNU_SOURCE
#define _ISO_C9X_SOURCE
> #include <math.h>
> #include <stdio.h>
> 
> int main(void)
> {
>   double two, three, r1, r2;
>   
>   printf("%f %f\n", fdim(2.0, 3.0), fdim(3.0, 2.0));
>   two = 2.0;
>   three = 3.0;
>   r1 = fdim (two, three);
...

You should have noticed that you had to link with -lm; normally you
don't, fdim is expanded inline.

-- 
Geoffrey Keating <geoffk@ozemail.com.au>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]