17 Apr
2001
17 Apr
'01
4:04 p.m.
Mon, 16 Apr 2001 19:03:21 -0700, Ashley Yakeley <ashley@semantic.org> pisze:
Why (toRational 0.9) == (9 % 10) is False?
Because the type of 0.9 is ambiguous and is being defaulted to Double. You can just write 0.9: it will have type Rational if needed. No need to convert it. You can also add default (Integer, Rational) in the module to let ambiguous numeric types default to Rational. -- __("< Marcin Kowalczyk * qrczak@knm.org.pl http://qrczak.ids.net.pl/ \__/ ^^ SYGNATURA ZASTÊPCZA QRCZAK