mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-25 06:20:06 +00:00
f1debaf682
2004-05-06 Ulrich Drepper <drepper@redhat.com> * math/tgmath.h (fabs): Use __TGMATH_UNARY_REAL_IMAG_RET_REAL. (carg): Likewise. Patch by Lev S Bishop <lev.bishop@yale.edu>. * math/bug-tgmath1.c (main): Test fabs and carg as well. 2004-05-06 Richard Henderson <rth@redhat.com> * elf/elf.h (AT_L1I_CACHESHAPE, AT_L1D_CACHESHAPE, AT_L2_CACHESHAPE, AT_L3_CACHESHAPE): New. * sysdeps/unix/sysv/linux/alpha/Versions: Export __libc_alpha_cache_shape as a private symbol. * sysdeps/unix/sysv/linux/alpha/dl-sysdep.c: New file. * sysdeps/unix/sysv/linux/alpha/sysconf.c: New file. * sysdeps/alpha/divl.S: Use them. * sysdeps/alpha/divq.S: Likewise. * sysdeps/alpha/divqu.S: Likewise. * sysdeps/alpha/reml.S: Likewise. * sysdeps/alpha/remq.S: Likewise. * sysdeps/alpha/remqu.S: Likewise.
48 lines
1.4 KiB
C
48 lines
1.4 KiB
C
#include <stdio.h>
|
|
#include <tgmath.h>
|
|
|
|
|
|
int
|
|
main (void)
|
|
{
|
|
int retval = 0;
|
|
|
|
#define TEST(expr, res) \
|
|
if (sizeof (expr) != res) \
|
|
{ \
|
|
printf ("sizeof(%s) == %zu, expected %zu\n", #expr, \
|
|
sizeof (expr), (size_t) (res)); \
|
|
retval = 1; \
|
|
}
|
|
|
|
TEST (creal (1.0), sizeof (double));
|
|
TEST (creal (1.0 + 1.0i), sizeof (double));
|
|
TEST (creal (1.0l), sizeof (long double));
|
|
TEST (creal (1.0l + 1.0li), sizeof (long double));
|
|
TEST (creal (1.0f), sizeof (float));
|
|
TEST (creal (1.0f + 1.0fi), sizeof (float));
|
|
|
|
TEST (cimag (1.0), sizeof (double));
|
|
TEST (cimag (1.0 + 1.0i), sizeof (double));
|
|
TEST (cimag (1.0l), sizeof (long double));
|
|
TEST (cimag (1.0l + 1.0li), sizeof (long double));
|
|
TEST (cimag (1.0f), sizeof (float));
|
|
TEST (cimag (1.0f + 1.0fi), sizeof (float));
|
|
|
|
TEST (fabs (1.0), sizeof (double));
|
|
TEST (fabs (1.0 + 1.0i), sizeof (double));
|
|
TEST (fabs (1.0l), sizeof (long double));
|
|
TEST (fabs (1.0l + 1.0li), sizeof (long double));
|
|
TEST (fabs (1.0f), sizeof (float));
|
|
TEST (fabs (1.0f + 1.0fi), sizeof (float));
|
|
|
|
TEST (carg (1.0), sizeof (double));
|
|
TEST (carg (1.0 + 1.0i), sizeof (double));
|
|
TEST (carg (1.0l), sizeof (long double));
|
|
TEST (carg (1.0l + 1.0li), sizeof (long double));
|
|
TEST (carg (1.0f), sizeof (float));
|
|
TEST (carg (1.0f + 1.0fi), sizeof (float));
|
|
|
|
return retval;
|
|
}
|