[prev in list] [next in list] [prev in thread] [next in thread] 

List:       haskell-cafe
Subject:    Re: [Haskell-cafe] segfault on fromIntegral (floor $ sqrt (-123.123)) == -123.123
From:       Brandon Allbery <allbery.b () gmail ! com>
Date:       2014-02-24 19:48:05
Message-ID: CAKFCL4Vkce0jnv+G_1r8cjj+x728x-ujQCAB=hhdHspugfkUGA () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


On Mon, Feb 24, 2014 at 2:46 PM, Erik Rantapaa <erantapaa@gmail.com> wrote:

> I'm getting a segfault on this expression entered into ghci:
>
> GHCi, version 7.6.3: 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> fromIntegral (floor $ sqrt (-123.123)) == -123.123
> Segmentation fault: 11
>
> I'm running the 32-bit version of the Haskell Platform on OSX.
>

Known bug with floating point on OS X. Not sure what the workaround is, but
known to be fixed in 7.8.1 (which is in release candidate stage).

-- 
brandon s allbery kf8nh                               sine nomine associates
allbery.b@gmail.com                                  ballbery@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net

[Attachment #5 (text/html)]

<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Feb 24, 2014 \
at 2:46 PM, Erik Rantapaa <span dir="ltr">&lt;<a href="mailto:erantapaa@gmail.com" \
target="_blank">erantapaa@gmail.com</a>&gt;</span> wrote:<br> <blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr">I&#39;m getting a segfault on this expression \
entered into ghci:<div><br></div><div><div>GHCi, version 7.6.3: <a \
href="http://www.haskell.org/ghc/" target="_blank">http://www.haskell.org/ghc/</a>   \
:? for help</div> <div>Loading package ghc-prim ... linking ... done.</div>
<div>Loading package integer-gmp ... linking ... done.</div><div>Loading package base \
... linking ... done.</div><div>Prelude&gt; fromIntegral (floor $ sqrt (-123.123)) == \
-123.123</div><div>Segmentation fault: 11</div></div>

<div><br></div><div>I&#39;m running the 32-bit version of the Haskell Platform on \
OSX.</div></div></blockquote><div><br></div><div>Known bug with floating point on OS \
X. Not sure what the workaround is, but known to be fixed in 7.8.1 (which is in \
release candidate stage).</div> <div><br></div></div>-- <br><div \
dir="ltr"><div>brandon s allbery kf8nh                                              \
sine nomine associates</div><div><a href="mailto:allbery.b@gmail.com" \
target="_blank">allbery.b@gmail.com</a>                                               \
<a href="mailto:ballbery@sinenomine.net" \
target="_blank">ballbery@sinenomine.net</a></div> <div>unix, openafs, kerberos, \
infrastructure, xmonad            <a href="http://sinenomine.net" \
target="_blank">http://sinenomine.net</a></div></div> </div></div>



_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic