Haskell question

Conal Elliott conal@microsoft.com
Thu, 28 Dec 2000 15:23:05 -0800

It's probably due to rounding.  If you use "^" instead of "**", defaulting
to integers, you'll get the triples you expected.  - Conal

-----Original Message-----
From: Scott [mailto:adric@wipcradio.cc]
Sent: Thursday, December 28, 2000 3:05 PM
To: Haskell-Cafe@haskell.org
Subject: Haskell question

   I am reading Discrete Mathematics Using a computer by Hall and O'Donnell 
and in the introduction to hugs section, they give this example:
[[x,y] | x<-[1..50],y<-[1..50],z<-[1..50],x**2+y**2==z**2]
now I type it in and expect it to return a number of results, but it 
doesn't, it shows:
My question is where is [3.0,4.0,5.0],[5.0,12.0,13.0]?
I have looked everywhere I could think of to see what I am doing wrong, but 
I have no idea.  Maybe a rounding error somewhere?
Thank you,
  Scott Anderson

Haskell-Cafe mailing list