[Python-Dev] Mixing float and Decimal -- thread reboot
Nick Coghlan
ncoghlan at gmail.com
Sun Mar 21 07:58:24 CET 2010
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 at gmail.com | Brisbane, Australia
---------------------------------------------------------------
More information about the Python-Dev
mailing list