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.
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
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 machin
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
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
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
syno
Cale Gibbard wrote:
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.
Alright, that was my guess (though I had no idea which was which).
I expect you'll replace ints with
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
Hello,
What's the difference between "Int" and "Integer"?
How can I tell Haskell which one I want? I'm having trouble with a function:
ints = 0 : map (1+) ints
prng = map iter ints
where iter 0 = [0,0]
iter n = [i,j]
where i = mod n 256
j = ints