On Thu, Jan 3, 2013 at 12:11 PM, Daniel Fischer
<daniel.is.fisc...@googlemail.com> wrote:
> On Donnerstag, 3. Januar 2013, 09:01:11, Geoffrey Mainland wrote:
>>
>>     Fix LLVM code generated for word2Float# and word2Double#.
>>
>
> That reminds me, on 32-bit,
>
> 2^53 :: Word
>
> is 0, and that means the test fails.

I don't have access to a 32-bit machine, would someone mind fixing the test?

A quick fix would be to have this test only run on 64-bit. A better
fix would be to have two tests, one for 64-bit and on for 32-bit. The
latter would use

    -- 4294967295 is 2^32, which can be stored in a 64-bit IEEE
floating-point value without
    -- loss of precision.
    print (D# (word2Double# 4294967295##))

instead of

    print (D# (word2Double# 9007199254740992##))

and have the stdout changed to include

    4.294967295e9

instead of

    9.007199254740992e15

-- Johan

_______________________________________________
Cvs-ghc mailing list
Cvs-ghc@haskell.org
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to