This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/50880] __complex_acosh() picks wrong complex branch
- From: "kreckel at ginac dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 28 Oct 2011 07:06:57 +0000
- Subject: [Bug libstdc++/50880] __complex_acosh() picks wrong complex branch
- Auto-submitted: auto-generated
- References: <bug-50880-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50880
--- Comment #5 from Richard B. Kreckel <kreckel at ginac dot de> 2011-10-28 07:06:57 UTC ---
On 10/27/2011 11:24 AM, paolo.carlini at oracle dot com wrote:
> Thus, to understand and clarify why this has not been noticed so far, you are
> on a target which doesn't support in the underlying C library these complex
> functions, right? Because normally (eg, on Linux) these days we just forward to
> __builtin_cacosh*, the code you are touching is just a "surrogate", a
> "fallback", which doesn't get right all the special cases, NaNs, infinity.
Well, I didn't "notice" it. Searching for bugs involving branch cut
positions of inverse trig functions in a range of FOSS projects is a pet
project of mine. ;-)
BTW: I noticed that my patch tests if (__z.real() < -0.0), which is
correct, but the sign of zero looks eccentric and might potentially
confuse future readers. I suggest removing it. It doesn't matter at all,
anyhow.