[Haskell-beginners] Int V.S. Word32

Sebastian Hungerecker sepp2k at googlemail.com
Sun Nov 20 13:53:20 CET 2011


On 20.11.2011 07:50, Haisheng Wu wrote:
> Hmm... I think I made a little confusion so I put my finding here:
> http://haisgwu.info/posts/2011-11-20-euler-problem-14.html
>
> I do got stack overflow thus need several compile opts to fix it.
> Not sure if it is what you mean by "You get overflow using 32-bit types
> here."

No, what he meant was that your n does not always fit into a 32-bit integer,
so the integer will overflow (i.e. once it exceeds its maximum value it will
wrap around and become negative).



More information about the Beginners mailing list