[Haskell-cafe] Different answers on different machines

Henry Laxen nadine.and.henry at pobox.com
Sun Jun 2 21:52:55 CEST 2013


Gregory Collins <greg <at> gregorycollins.net> writes:

> 
> On Sat, Jun 1, 2013 at 7:55 PM,  <nadine.and.henry <at> pobox.com> wrote:
> Yesterday I decided to take a look at the most recent Euler problem,
> number 249, and give it a shot.  I have a couple of computers at home,
> a Dell laptop and a desktop.  I compiled this message with ghc -O2
> --make ex429.lhs and ran it on each machine.  On the Dell I get:
> 
> Odds are good it's integer overflow. Change Int to Integer or Int64 and 
retry.G-- Gregory Collins <greg <at> gregorycollins.net>
> 

Yes, that was it.  The dell was a 32 bit system, and the desktop a 64.  I 
changed everything from Int to Integer, and now both agree.  Thanks for the 
pointer.
Best wishes,
Henry Laxen




More information about the Haskell-Cafe mailing list