Re: [Haskell-cafe] Int vs Integer

2005-12-19 Thread Wolfgang Jeltsch
Am Montag, 19. Dezember 2005 01:10 schrieb Jared Updike: Int is for bounded values -2**32 to 2**32 (I think... maybe 2**-31 and 2**31 or less if it's boxed?) based on the underlying machine representation. Not really true. As far as I remember, the Haskell Report just says that Int covers at

Re: [Haskell-cafe] Int vs Integer

2005-12-19 Thread Benjamin Franksen
On Monday 19 December 2005 11:26, Wolfgang Jeltsch wrote: Am Montag, 19. Dezember 2005 01:10 schrieb Jared Updike: Int is for bounded values -2**32 to 2**32 (I think... maybe 2**-31 and 2**31 or less if it's boxed?) based on the underlying machine representation. Not really true. As far

[Haskell-cafe] Int vs Integer

2005-12-18 Thread Daniel Carrera
Hello all, I found a good Haskell tutorial (second link on the Tutorials column) (now that I know how to run the programs in it). I have a question. What's the difference between the types Int and Integer? Likewise, what's the difference between the types Float and Double? Are those just

Re: [Haskell-cafe] Int vs Integer

2005-12-18 Thread Chris Kuklewicz
Daniel Carrera wrote: Hello all, I found a good Haskell tutorial (second link on the Tutorials column) (now that I know how to run the programs in it). I have a question. What's the difference between the types Int and Integer? Likewise, what's the difference between the types Float and

Re: [Haskell-cafe] Int vs Integer

2005-12-18 Thread Jared Updike
Int is for bounded values -2**32 to 2**32 (I think... maybe 2**-31 and 2**31 or less if it's boxed?) based on the underlying machine representation. Integer is unbounded (arbitrary precision, i.e. 7489571948579148758174534 is a valid Integer). Double is for floating point values corresponding to C

Re: [Haskell-cafe] Int vs Integer

2005-12-18 Thread Daniel Carrera
Thanks for the info, and the link. I probably should have guessed the Double vs Float one. I did program in C a while ago... Cheers, Daniel. Jared Updike wrote: Int is for bounded values -2**32 to 2**32 (I think... maybe 2**-31 and 2**31 or less if it's boxed?) based on the underlying

Re: [Haskell-cafe] Int vs Integer?

2005-05-05 Thread Cale Gibbard
Int is the type of machine integers, with guaranteed range at least -2^29 to 2^29 - 1, while Integer is arbitrary precision integers, with range as large as you have memory for. The code you gave, on its own, is fine. The types inferred by ghci are ints :: [Int] and prng :: [[Int]] Hugs seems to