This is the mail archive of the libc-alpha@sourceware.org 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]
Other format: [Raw text]

csinh bug?


I am curious if anyone else has seen a problem with the complex hyberbolic
sin function in glibc?  I noticed that the GCC test complex_intrinsic_3.f90
was failing for me on MIPS and when I rewrote the test in C it still failed.

Since the code is basically just generating a call to csinh and MIPS doesn't
have a special implementation of this function, I was wondering if anyone else
has seen this problem on other platforms?

Steve Ellcey
sellcey@mips.com


% cat complex.c
#include <stdio.h>
#include <complex.h>
#include <math.h>
int main()
{
	double complex x;
	x = 0.63496391478473613 + 1.2984575814159773I;
	printf("x = %f %f\n", creal(x), cimag(x));
	x = csinh(x);
	printf("x = %f %f\n", creal(x), cimag(x));
	return 0;
}

On x86 (older gcc, older glibc):

% gcc -std=c99 complex.c -lm -o x
% ./x
x = 0.634964 1.298458
x = 0.182506 1.163916

Using MIPS cross compiler and qemu (ToT gcc, ToT glibc, ToT qemu):

% mips-mti-linux-gnu-gcc -std=c99 complex.c -lm -static -o x
% qemu-mips ./x
x = 0.634964 1.298458
x = inf inf


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