diff options
Diffstat (limited to 'newlib/libm/complex')
-rw-r--r-- | newlib/libm/complex/cacos.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/newlib/libm/complex/cacos.c b/newlib/libm/complex/cacos.c index 3196d970f..86e119842 100644 --- a/newlib/libm/complex/cacos.c +++ b/newlib/libm/complex/cacos.c @@ -82,8 +82,18 @@ cacos(double complex z) { double complex w; + /* FIXME: The original NetBSD code results in an ICE when trying to + build this function on ARM/Thumb using gcc 4.5.1. For now we use + a hopefully temporary workaround. */ +#if 0 w = casin(z); - w = M_PI_2 - creal(w); - w -= (cimag(w) * I); + w = (M_PI_2 - creal(w)) - cimag(w) * I; +#else + double complex tmp0, tmp1; + + tmp0 = casin(z); + tmp1 = M_PI_2 - creal(tmp0); + w = tmp1 - (cimag(tmp0) * I); +#endif return w; } |