[GHC] #9810: encodeFloat 1 2047 = -1024.0

GHC ghc-devs at haskell.org
Tue Nov 18 05:54:18 UTC 2014


#9810: encodeFloat 1 2047 = -1024.0
-------------------------------------+-------------------------------------
              Reporter:  luite       |            Owner:
                  Type:  bug         |           Status:  new
              Priority:  normal      |        Milestone:
             Component:  Compiler    |          Version:  7.9
            Resolution:              |         Keywords:
      Operating System:              |     Architecture:  Unknown/Multiple
  Unknown/Multiple                   |       Difficulty:  Unknown
       Type of failure:              |       Blocked By:
  None/Unknown                       |  Related Tickets:  #9811
             Test Case:              |
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------
Changes (by rwbarton):

 * related:   => #9811


Comment:

 The old correct behavior depended somewhat precariously on being able to
 round-trip floating-point infinities through `toRational/fromRational`.
 This causes other wrong behavior, see #9811.

 While the situation with constant folding of floating-point is not ideal
 anyways, we should restore the old behavior of `toRational`
 (`decodeFloat`).

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


More information about the ghc-tickets mailing list