RE: rounding in Haskell -- a bug in hugs

2000-02-09 Thread John Hughes
Frank Christoph writes: It seems to me there is a tension between using show as a way of doing quick and dirty pretty-printing, and as a way of getting a portable representation of data. This is a "bug" in hugs. To illustrate the problem, the next floating point number after 5.0 is

RE: rounding in Haskell -- a bug in hugs

2000-02-09 Thread Mark P Jones
Hi John, | This is a "bug" in hugs. | | To illustrate the problem, the next floating point number after | 5.0 is 5.0047, | which hugs also prints as 5.0. One might argue that to display it | as 5.005 would | be misleading, since this number is the closest representable to |

Re: rounding in Haskell -- a bug in hugs

2000-02-09 Thread Fergus Henderson
On 09-Feb-2000, Mark P Jones [EMAIL PROTECTED] wrote: The Numeric.showFloat function is there for the more expert programmers who care about the last few bits after the floating point. That's the function that a Haskell programmer should use if they need this kind of functionality. I can