------- Comment #2 from pinskia at gcc dot gnu dot org 2010-04-19 22:57 -------
Here is the fixed up C testcase:
#include <math.h>
#include <complex.h>
#include <stdio.h>
#define _GNU_SOURCE
#include <gnu/libc-version.h>
#include <stdlib.h>
int main (int argc, char **argv)
{
long double complex arg = 1 + _Complex_I;
long double complex s, c, r, t;
long mult;
if (argc == 2) {
mult = atol(argv[1]);
} else {
mult = 50000L;
}
arg *= mult;
s = csinhl (arg);
c = ccoshl (arg);
r = s / c;
t = ctanhl (arg);
printf ("libc version %s\n", gnu_get_libc_version ());
printf ("libc release %s\n", gnu_get_libc_release ());
printf ("arg = %Le + %Le * i\n", creall (arg), cimagl
(arg));
printf ("sinh (arg) = %Le + %Le * i\n",
creall (s), cimagl (s));
printf ("cosh (arg) = %Le + %Le * i\n",
creall (c), cimagl (c));
printf("s/c = %Le + %Le * i (should be 1 + 0 * i)\n",
creall (r), cimagl (r));
printf ("tanh (arg) = %Le + %Le * i (should be 1 + 0 * i)\n",
creall (t), cimagl (t));
return 0;
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43802