[GHC] #14377: some results not expected with the addition
GHC
ghc-devs at haskell.org
Sun Oct 22 18:47:07 UTC 2017
#14377: some results not expected with the addition
-------------------------------------+-------------------------------------
Reporter: vanto | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.2.1
Resolution: | Keywords:
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 svenpanne):
A tiny bit of googling would have showed that the problem is not easy at
all, see e.g. the 2nd part of https://cs.stackexchange.com/a/81039 or the
2nd volume of Knuth's TAOCP (Radix Conversions). Apart from the fact that
numeric algorithms are notoriously hard, there are tradeoffs here, e.g.
speed vs. "minimality" of the resulting string. Different implementations
just choose different points in the design space, so GHC's behavior is not
a bug at all and I propose to close this ticket. Remember: If there was a
single, universally "right" way to convert binary floats to a decimal
string, people probably wouldn't write papers/blogs/etc. about it for
several decades...
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14377#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list