The numerics in Haskell have not been carefully vetted, for a variety
of reasons. Not just under MS Windows, even under Linux. Here's an
example: atan has drastic loss of precision in the imaginary direction
around zero in the complex domain.
$ ghci
GHCi, version 8.8.4: https://www.haskell.org/ghc/ :? for help
Prelude> :m + Data.Complex
Prelude Data.Complex> tan (1e-20 :+ 0)
1.0e-20 :+ 0.0
Prelude Data.Complex> atan (1e-20 :+ 0)
1.0e-20 :+ (-0.0)
Prelude Data.Complex> tan (0 :+ 1e-20)
0.0 :+ 1.0e-20
Prelude Data.Complex> atan (0 :+ 1e-20)
0.0 :+ (-0.0)
Although there have been amazing efforts to use fancy PLT methods to
improve the numerics of programs using source-to-source
transformations and such, the boring janitorial work of checking and
fixing numeric issues in the standard library doesn't seem to attract
people. To be fair, it isn't my cup of tea either...
_______________________________________________
Haskell-Cafe mailing list
To (un)subscribe, modify options or view archives go to:
http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
Only members subscribed via the mailman list are allowed to post.