
Raymond Hettinger wrote:
On Mar 20, 2010, at 6:54 PM, Nick Coghlan wrote:
I suggest a 'linearised' numeric tower that looks like:
int -> Decimal -> Fraction -> float -> complex
Is that a typo? Shouldn't Decimal and float go between Fraction and complex?
The abstract numeric tower is:
Number Complex Real Rational Integral
where both Decimal and float have operations associated with reals.
I don't actually mind either way - the pragmatic tower is about coding convenience rather than numeric purity (and mixing Fractions and Decimals in the same algorithm is somewhat nonsensical - they're designed for two completely different problem domains). Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia ---------------------------------------------------------------