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>


Thanks All.

I get success .

Kaoru


# gcc -o trunc trunc.c -lm
# ./trunc
#trunc(aa):-1.000000
#trunc(bb):1.000000
#
-------------------trunc.c-----------------
#define __ISOC9X_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <math.h>

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]