Sorry, I didn't include the example, so here it is:
st> var5 := Fraction numerator: 123 denominator: 3 !
Fraction new "<0x1041b08>"
st> var5 printNl !
123/3
Fraction new "<0x1041b08>"
st> (var5 * (Fraction numerator: 1 denominator: 1)) printNl !
123/3
Fraction new "<0x104d998>"
st> (var5 * (Fraction numerator: 2 denominator: 1)) printNl !
246/3
At 09:40 AM 1/22/2007 +0100, Paolo Bonzini wrote:
I also found that the class comment is inaccurate, the arithmatic operators
do not answer a reduced fraction, the reduce private method is never
accessed.
Please verify your assertions, as you obviously did (instead) for the
#storeOn: bug which is real. #reduce is never called because the
arithmetic operators compute gcd's on their own for speed.
st> ^(3/4)+(1/4)
st> !
1
Paolo
_______________________________________________
help-smalltalk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-smalltalk