[GHC] #14927: Hyperbolic area sine is unstable for (even moderately) big negative arguments.
GHC
ghc-devs at haskell.org
Mon Apr 30 10:34:51 UTC 2018
#14927: Hyperbolic area sine is unstable for (even moderately) big negative
arguments.
-------------------------------------+-------------------------------------
Reporter: leftaroundabout | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: libraries/base | Version: 8.2.1
Resolution: | Keywords: Floating
| IEEE754 trigonometric
Operating System: Unknown/Multiple | Architecture:
Type of failure: Incorrect result | Unknown/Multiple
at runtime | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by leftaroundabout):
Yes, the cut-offs come out different, but it doesn't really matter: `sqrt
(1 + x*x)` is still stable and accurate for a long way even when `x` is so
big that `1 + x*x == x*x`. So, whereas it's important that `huge` should
not be ''smaller'' than `1/sqrt epsilon ≈ 6.7e7`, it ''can'' actually be
much bigger: `1e100` would also work in case of `Double`. Therefore,
`1/epsilon ≈ 4.5e15` is a safe compromise that's presumably less likely to
give new surprising corner-cases.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14927#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list