-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
This issue is sort of a placeholder, but it is hard for a plugin like this to operate in an environment where the numeric basis itself is rife with unnecessary loss of precision. Below are two examples of extremely poor and unnecessary truncation, of small values to zero, in atanh on Double and in asin and atan on Complex Double. It would be great if someone would let this tool run wild on the prelude!
$ ghci
GHCi, version 7.8.4: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Prelude> tan 5e-17
5.0e-17
Prelude> atan 5e-17
5.0e-17
Prelude> tanh 5e-17
5.0e-17
Prelude> atanh 5e-17
0.0
Prelude> :m + Data.Complex
Prelude Data.Complex> sin (0 :+ 5e-17)
0.0 :+ 5.0e-17
Prelude Data.Complex> asin (0 :+ 5e-17)
0.0 :+ (-0.0)
Prelude Data.Complex> tan (0 :+ 5e-17)
0.0 :+ 5.0e-17
Prelude Data.Complex> atan (0 :+ 5e-17)
0.0 :+ (-0.0)Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels