This is the mail archive of the libc-alpha@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: Problems with <tgmath.h>


From: Andreas Jaeger <aj@suse.de>

> tgmath.h is part of ISO C99 - therefore you should use _ISOC9X_SOURCE
> when including the file.

I have same problem.
this is result.

How do you think the result ?

My system is glibc-2.1.3
gcc-2.95.2
binutils-2.9.5.0.19
on powerpc mklinux.

Thanks 
Kaoru 

# gcc -o trunc trunc.c -lm
# ./trunc
#trunc(aa):-2147483648.000
#trunc(bb):0.000000
#

-------------------trunc.c-----------------
#include <>
#include <>
#include <>

#define __ISOC9X_SOURCE

int main () {
              double aa=-1.5;
              double bb=-1.5;

              printf("trunc(aa): %f\n",(double)trunc(aa));
              printf("trunc(bb): %f\n",(double)trunc(bb));

              return;
}
-------------- end of trunc.c -----------------



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