Re: word2Float test broken on 32-bit
Johan Tibell <[email protected]> Fri, 4 Jan 2013 11:01:46 -0500
| Newsgroups | gmane.comp.lang.haskell.cvs.ghc |
|---|---|
| Message-ID | <CAK-tuPbNJfJrxk77oHboKQsgh2_o3bm53CyHrq99pyBfkSRTcg@mail.gmail.com> |
On Thu, Jan 3, 2013 at 12:11 PM, Daniel Fischer <[email protected]> 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