strange behaviour with simple decimals



Stavros Macrakis wrote:

> A more radical suggestion (which I don't really believe in) would be to
> interpret floating-point notation as a way of inputting rationals, and do
> rational arithmetic until forced to do otherwise (e.g. fractional powers
> that aren't exact, trig function, etc.).  But I don't see that this would
> actually be useful.

Useful, maybe not if your concern is numerical speed.  It would,
however, ensure that various unexpected behaviors are not observed in
cases where people are accustomed to base 10 computation.  I find the
suggestion to be an interesting one.

I wouldn't expect it to be useful in a numerical environment, but after
all a symbolic computer algebra system is intended for different
purposes than numerical libraries and it is a valid question - is the
loss in speed worth the more intuitive (to a base ten accustomed user)
output that would result?  I don't know, but I would be reluctant to
dismiss the idea out of hand.

Cheers,
CY