[Bug?] Converting Float to Fraction

Tim Olson tim at io.com
Mon Feb 24 14:39:08 UTC 2003

Bill Spight <bspight at pacbell.net> wrote:
| Suppose we want to test whether a number is an integer. #isInteger
| the *form* of the number, so 
|     2 asFraction isInteger 
| is false.

how about using:

	self = self truncated

as the test?

I agree that the Float>>asFraction should probably be fixed to always
return a Fraction rather than an Integer.

	-- tim

More information about the Squeak-dev mailing list