[Haskell-cafe] Which one is right?

2009-06-24 Thread Linker
Hi,All, Construct a list: [0,0.1..1] || || || || || || ||__ Hugs 98: Based on the Haskell 98 standard ||___|| ||__|| ||__|| __|| Copyright (c) 1994-2005 ||---|| ___|| World Wide Web: http://haskell.org/hugs || ||

Re: [Haskell-cafe] Which one is right?

2009-06-24 Thread Thomas Davie
This looks like Hugs defaulting to a different type to ghci, specifically, Hugs is defaulting to one of the high precission types like CReal or Rational, while ghci is defaulting to Float or Double. Bob On 24 Jun 2009, at 21:03, Linker wrote: Hi,All, Construct a list: [0,0.1..1]

Re: [Haskell-cafe] Which one is right?

2009-06-24 Thread Bulat Ziganshin
Hello Linker, Wednesday, June 24, 2009, 11:03:19 PM, you wrote: Construct a list: [0,0.1..1] floats are newspeak: 2*2 may be more than 4 or less than 4 :) -- Best regards, Bulatmailto:bulat.zigans...@gmail.com ___

Re: [Haskell-cafe] Which one is right?

2009-06-24 Thread Daniel Fischer
Am Mittwoch 24 Juni 2009 21:05:50 schrieb Thomas Davie: This looks like Hugs defaulting to a different type to ghci, specifically, Hugs is defaulting to one of the high precission types like CReal or Rational, while ghci is defaulting to Float or Double. Bob No, hugs is displaying with fewer

Re: [Haskell-cafe] Which one is right?

2009-06-24 Thread Jake McArthur
Linker wrote: Hugs [0,0.1..1] [0.0,0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0] Prelude [0,0.1..1] [0.0,0.1,0.2,0.30004,0.4,0.5,0.6,0.7,0.7999,0.8999,0.] Just floating point errors. In this case, you may be able to get away with something