public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug math/10716] various problems in cacosh and cacos
       [not found] <bug-10716-131@http.sourceware.org/bugzilla/>
@ 2011-11-23  8:45 ` kreckel at ginac dot de
  2012-03-06  3:00 ` jsm28 at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 4+ messages in thread
From: kreckel at ginac dot de @ 2011-11-23  8:45 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=10716

Richard B. Kreckel <kreckel at ginac dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kreckel at ginac dot de

--- Comment #1 from Richard B. Kreckel <kreckel at ginac dot de> 2011-11-23 08:45:16 UTC ---
(In reply to comment #0)
> The classical branch cut for cacosh() is (-inf, 1). However, cacosh() is using
> a different branch cut.

Branch cuts being standardized in C99 this is now a matter of conformance!

> cacosh(-1 + -0 I) -> (0 + 3.14159265358979 I)

After applying the patch attached to BZ #13305 the correct result 0 -
3.14159265358979*I is returned.

> cacos(1 + 0 I) -> (0 + 0 I) [should be (0 - O I)]

This is how cacos is computed by glibc:
cacos(x)
  ->  Pi/2 - casin(x)
  ->  Pi/2 - casinh(x I)/I
So, cacos(1 + 0 I) eventually ends up computing casinh(-O + I) which, in turn,
is computed using log(x+sqrt(1+x^2)). But that formula stands no chance getting
the sign of zero in the real part right along the strip running from -I to +I.
To fix it, it would have to be rewritten using a formula that computes the real
and the imaginary part completely independently.

> Finally the documentation of cacosh says that the real part of the result is
> chosen non-negative, which is clearly wrong on this example:
> 
> cacosh(-3.45677995681763 + -2.3456699848175 I) -> (-2.11780021549476 + 2.53187508681341 I)

This appears to have been fixed long ago with BZ #2153.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug math/10716] various problems in cacosh and cacos
       [not found] <bug-10716-131@http.sourceware.org/bugzilla/>
  2011-11-23  8:45 ` [Bug math/10716] various problems in cacosh and cacos kreckel at ginac dot de
@ 2012-03-06  3:00 ` jsm28 at gcc dot gnu.org
  2012-03-07 15:17 ` jsm28 at gcc dot gnu.org
  2014-07-01  6:44 ` fweimer at redhat dot com
  3 siblings, 0 replies; 4+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2012-03-06  3:00 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=10716

Joseph Myers <jsm28 at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|aj at suse dot de           |jsm28 at gcc dot gnu.org

--- Comment #2 from Joseph Myers <jsm28 at gcc dot gnu.org> 2012-03-06 02:58:52 UTC ---
Confirmed (as regards signs of 0) with current sources.  Patch:
http://sourceware.org/ml/libc-alpha/2012-03/msg00112.html

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug math/10716] various problems in cacosh and cacos
       [not found] <bug-10716-131@http.sourceware.org/bugzilla/>
  2011-11-23  8:45 ` [Bug math/10716] various problems in cacosh and cacos kreckel at ginac dot de
  2012-03-06  3:00 ` jsm28 at gcc dot gnu.org
@ 2012-03-07 15:17 ` jsm28 at gcc dot gnu.org
  2014-07-01  6:44 ` fweimer at redhat dot com
  3 siblings, 0 replies; 4+ messages in thread
From: jsm28 at gcc dot gnu.org @ 2012-03-07 15:17 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=10716

Joseph Myers <jsm28 at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #3 from Joseph Myers <jsm28 at gcc dot gnu.org> 2012-03-07 15:16:46 UTC ---
Fixed by:

commit d1d3431a3a9dd14501eedb701436bd5005b1db7d
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Wed Mar 7 15:15:19 2012 +0000

    Fix signs of zeros from casinh, cacosh etc. (bug 10716).

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug math/10716] various problems in cacosh and cacos
       [not found] <bug-10716-131@http.sourceware.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2012-03-07 15:17 ` jsm28 at gcc dot gnu.org
@ 2014-07-01  6:44 ` fweimer at redhat dot com
  3 siblings, 0 replies; 4+ messages in thread
From: fweimer at redhat dot com @ 2014-07-01  6:44 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=10716

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
              Flags|                            |security-

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-07-01  6:44 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-10716-131@http.sourceware.org/bugzilla/>
2011-11-23  8:45 ` [Bug math/10716] various problems in cacosh and cacos kreckel at ginac dot de
2012-03-06  3:00 ` jsm28 at gcc dot gnu.org
2012-03-07 15:17 ` jsm28 at gcc dot gnu.org
2014-07-01  6:44 ` fweimer at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).