<div dir="ltr">So, it appears that the one ending with 21 is the likely correct result; as opposed to 22.<div><br></div><div>Is this an issue with some underlying library (glibc etc.); or an issue with GHC itself?</div></div>
<div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Jul 12, 2014 at 8:03 PM, GHC <span dir="ltr"><<a href="mailto:ghc-devs@haskell.org" target="_blank">ghc-devs@haskell.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="">#9304: Floating point woes; Different behavior on Mac vs Linux<br>
</div>-------------------------------------+------------------------------------<br>
<div class="">        Reporter:  lerkok            |            Owner:<br>
            Type:  bug               |           Status:  new<br>
        Priority:  high              |        Milestone:<br>
       Component:  Compiler          |          Version:  7.8.3<br>
</div>      Resolution:                    |         Keywords:  floating point<br>
<div class="">Operating System:  Unknown/Multiple  |     Architecture:  Unknown/Multiple<br>
 Type of failure:  None/Unknown      |       Difficulty:  Unknown<br>
</div><div class="">       Test Case:                    |       Blocked By:  9276<br>
        Blocking:                    |  Related Tickets:<br>
-------------------------------------+------------------------------------<br>
<br>
</div>Comment (by carter):<br>
<br>
 I ran it on a 64 bit linux server i have using ghci<br>
 {{{<br>
 Prelude> :set -XScopedTypeVariables<br>
 Prelude> let x :: Double = -4.4<br>
 Prelude> let y :: Double = 2.4999999999999956<br>
 Prelude> decodeFloat (x*y)<br>
 (-6192449487634421,-49)<br>
<br>
 }}}<br>
<br>
 so if anything, it looks like its 32bit vs 64bit<br>
<br>
 could you try running the above snippet in GHCi on your  32bit machine?<br>
<br>
--<br>
Ticket URL: <<a href="http://ghc.haskell.org/trac/ghc/ticket/9304#comment:4" target="_blank">http://ghc.haskell.org/trac/ghc/ticket/9304#comment:4</a>><br>
<div class="HOEnZb"><div class="h5">GHC <<a href="http://www.haskell.org/ghc/" target="_blank">http://www.haskell.org/ghc/</a>><br>
The Glasgow Haskell Compiler<br>
</div></div></blockquote></div><br></div>