RE: Questions about printing and rounding Float numbers

2000-06-27 Thread Sigbjorn Finne
Lennart Augustsson <[EMAIL PROTECTED]> writes: > > > (I have never known. Sorry to be dense. I guess you put in 7 or > > something if some operator has precedence 7. I know, I could read > > the code...) > > Get an old version of the Haskell report; it's spelled out in > detail there. I'm no

Re: Questions about printing and rounding Float numbers

2000-06-27 Thread Lennart Augustsson
Peter Hancock wrote: > > "Lennart" == Lennart Augustsson <[EMAIL PROTECTED]> writes: > > >> I always thought that the Int argument to showsPrec is the precision. > >> So what is it good for? The library report does not explain it. > > > It's used to indicate the precedence when yo

Re: Questions about printing and rounding Float numbers

2000-06-27 Thread Peter Hancock
> "Lennart" == Lennart Augustsson <[EMAIL PROTECTED]> writes: >> I always thought that the Int argument to showsPrec is the precision. >> So what is it good for? The library report does not explain it. > It's used to indicate the precedence when you print with operators to avoid

Re: Questions about printing and rounding Float numbers

2000-06-27 Thread Lennart Augustsson
Michael Marte wrote: > > Michael Marte wrote: > > > > > I have a simple problem but it seems to be quite involved: I want to print > > > floating point numbers with a given number of decimal points. > > > > > > First, I found out that both ghc and hugs do not consider the precision > > > argument

Re: Questions about printing and rounding Float numbers

2000-06-26 Thread Jan Skibinski
On Mon, 26 Jun 2000, Michael Marte wrote: > I always thought that the Int argument to showsPrec is the precision. > So what is it good for? The library report does not explain it. I sometimes use it to distinguish between the top and the lower levels of nested data structures,

Re: Questions about printing and rounding Float numbers

2000-06-26 Thread Michael Marte
> Michael Marte wrote: > > > I have a simple problem but it seems to be quite involved: I want to print > > floating point numbers with a given number of decimal points. > > > > First, I found out that both ghc and hugs do not consider the precision > > argument to showPrec. > > What precision a

Re: Questions about printing and rounding Float numbers

2000-06-25 Thread Lennart Augustsson
Michael Marte wrote: > I have a simple problem but it seems to be quite involved: I want to print > floating point numbers with a given number of decimal points. > > First, I found out that both ghc and hugs do not consider the precision > argument to showPrec. What precision argument? There's

Re: Questions about printing and rounding Float numbers

2000-06-24 Thread Marcin 'Qrczak' Kowalczyk
Sat, 24 Jun 2000 15:04:14 +0200 (CEST), Michael Marte <[EMAIL PROTECTED]> pisze: > First, I found out that both ghc and hugs do not consider the precision > argument to showPrec. In fact, the standard prelude of Haskell 98 proposes > to drop the precision argument in showsPrec in the Show instan

Questions about printing and rounding Float numbers

2000-06-24 Thread Michael Marte
I have a simple problem but it seems to be quite involved: I want to print floating point numbers with a given number of decimal points. First, I found out that both ghc and hugs do not consider the precision argument to showPrec. In fact, the standard prelude of Haskell 98 proposes to drop the p