[GHC] #8532: Hyperbolic arc cosine fails on (-1) :: Complex r.

GHC ghc-devs at haskell.org
Fri May 16 18:39:44 UTC 2014


#8532: Hyperbolic arc cosine fails on (-1) :: Complex r.
-------------------------------------+-------------------------------------
        Reporter:  leftaroundabout   |            Owner:
            Type:  bug               |           Status:  new
        Priority:  low               |        Milestone:
       Component:  libraries/base    |          Version:  7.6.3
      Resolution:                    |         Keywords:
Operating System:  Unknown/Multiple  |     Architecture:  Unknown/Multiple
 Type of failure:  Incorrect result  |       Difficulty:  Easy (less than 1
  at runtime                         |  hour)
       Test Case:  acosh(-1) ::      |       Blocked By:
  Complex Double                     |  Related Tickets:
        Blocking:                    |
-------------------------------------+-------------------------------------

Comment (by ekmett):

 We do pick the standard branch cut location. That said, it is possible to
 give a more general form with a specified branch cut.

 I do so for all of these functions and more for quaternions in
 http://hackage.haskell.org/package/linear-1.10.1.1/docs/Linear-
 Quaternion.html

 You pick the location of the branch cut by supplying a unit quaternion.

 Adapting this logic to a choice of point on the unit circle could be done,
 but I confess I'd rather hash that out in libraries before asserting it is
 the right approach for something like base. Almost nobody knows how to use
 the more exotic cuts, but importantly they can be formed from the standard
 cut and identities by somone with sufficient background to be aware of the
 issue.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8532#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list