diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2011-07-13 11:18:54 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2011-07-13 11:18:54 +0400 |
commit | 1d15e018c78614860322e074b8f9ff24d829637f (patch) | |
tree | 2e136bed38f17ffa3ac27f830acb86810744e27e /newlib | |
parent | e021e18968dae2f5ea0334b2a55a1ca77d5c426e (diff) |
* libm/complex/cacos.c: Use temporaries and correct sequencing
error in previous reordering change.
Diffstat (limited to 'newlib')
-rw-r--r-- | newlib/ChangeLog | 5 | ||||
-rw-r--r-- | newlib/libm/complex/cacos.c | 14 |
2 files changed, 17 insertions, 2 deletions
diff --git a/newlib/ChangeLog b/newlib/ChangeLog index 2c7ecc7ea..8a986faf4 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,8 @@ +2011-07-13 Hans-Peter Nilsson <hp@axis.com> + + * libm/complex/cacos.c: Use temporaries and correct sequencing + error in previous reordering change. + 2011-06-25 Andreas Becker <becker@se-elektronic.de> * libc/time/mktime.c (mktime): Lock global timezone info while 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; } |