[Newbies] Float comparsion

Camillo Bruni camillobruni at students.unibe.ch
Fri Feb 27 12:22:23 UTC 2009

Hy all,
I recently tried to compare two Float which apparently should be  
(nearly) the same.
I have to following excerpt:

	a := (Float halfPi / 2) tan
	a = 1.0

The comparison evaluates to false, although it should be 1.0.
How do I compare Floats so I get useful results?

I'm using Squeak 3.8.18beta3U VM and the
Squeak3.10.2-7179-basic.image on Mac OS X 10.5 with an Intel Core 2 Duo.


More information about the Beginners mailing list