This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.
Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Here's Jakub's testcase with some minimal changes. Andreas 2001-01-25 Andreas Jaeger <aj@suse.de> * math/test-tgmath.c: New file, contributed by Jakub Jelinek <jakub@redhat.com>. * math/Makefile (tests): Add test-tgmath. ============================================================ Index: math/Makefile --- math/Makefile 2000/09/28 23:08:29 1.100 +++ math/Makefile 2001/01/25 19:27:43 @@ -1,4 +1,4 @@ -# Copyright (C) 1996, 1997, 1998, 1999, 2000 Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. # This file is part of the GNU C Library. # The GNU C Library is free software; you can redistribute it and/or @@ -79,7 +79,7 @@ # Rules for the test suite. tests = test-matherr test-fenv atest-exp atest-sincos atest-exp2 basic-test \ - test-misc test-fpucw tst-definitions + test-misc test-fpucw tst-definitions test-tgmath # We do the `long double' tests only if this data type is available and # distinct from `double'. test-longdouble-yes = test-ldouble test-ildoubl ============================================================ Index: math/test-tgmath.c --- math/test-tgmath.c created +++ math/test-tgmath.c Thu Jan 25 19:22:45 2001 1.1 @@ -0,0 +1,94 @@ +/* Test compilation of tgmath macros. + Copyright (C) 2001 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Jakub Jelinek <jakub@redhat.com>, 2001. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ + +#include <math.h> +#include <tgmath.h> + +double x; + +extern void compile_test (void); + +void +compile_test (void) +{ + double a, b, c; + int i; + long int j; + long long int k; + + a = cos (x); + b = acos (a); + a = sin (x); + b = asin (a); + a = tan (x); + b = atan (a); + c = atan2 (a, b); + a = cosh (x); + b = acosh (a); + a = sinh (x); + b = asinh (a); + a = tanh (x); + b = atanh (a); + a = exp (x); + b = log (a); + a = log10 (x); + b = ldexp (a, 5); + a = frexp (x, &i); + b = expm1 (a); + a = log1p (x); + b = logb (a); + a = exp2 (x); + b = log2 (a); + a = pow (x, c); + b = sqrt (a); + a = hypot (x, c); + b = cbrt (a); + a = ceil (x); + b = fabs (a); + a = floor (x); + b = fmod (a, c); + a = nearbyint (x); + b = round (a); + a = trunc (x); + b = remquo (a, c, &i); + j = lrint (x) + lround (a); + k = llrint (b) + llround (c); + a = erf (x); + b = erfc (a); + a = tgamma (x); + b = lgamma (a); + a = rint (x); + b = nextafter (a, c); + a = nexttoward (x, c); + b = remainder (a, c); + a = scalb (x, 6); + k = scalbn (a, 7) + scalbln (c, 10LL); + i = ilogb (x); + a = fdim (x, c); + b = fmax (a, c); + a = fmin (x, c); + b = fma (a, x, c); +} + +int +main (void) +{ + return 0; +} -- Andreas Jaeger SuSE Labs aj@suse.de private aj@arthur.inka.de http://www.suse.de/~aj
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |