2009/7/8 Hernan Wilkinson <hernan.wilkinson@gmail.com>
I added this new issue that happens on the latest image.
I'm posting it here because I think it is an important bug because it affects the number model.
The problem is related with all fractions who's denominator is not power of two. (130/100 = 1.3 or 1/5 = 0.2, etc)
(See
Float>>adaptToFraction: rcvr andCompare: selector where it does
....
"Try to avoid asTrueFraction because it can cost"
selector == #= ifTrue: [
rcvr denominator isPowerOfTwo ifFalse: [^false]].
...)


A hypothetical question: would it be harmful if the compiler stored number literals as Fractions rather than Floats? For example, the compiler could store "1.3" as the literal "13/10" in the CompiledMethod. The denominator would always be a multiple of 10 or whatever the base of the specified number is.

Gulik.


--
http://gulik.pbwiki.com/