Unexpected NANs in complex arithmetic

Paul Rubin no.email at nospam.invalid
Wed Jun 22 02:25:50 EDT 2016


Steven D'Aprano <steve+comp.lang.python at pearwood.info> writes:
>> By the time Python returns a result for inf+3j, you're already in
>> trouble (or perhaps Python is already in trouble).
> I don't see why. It is possible to do perfectly sensible arithmetic on INFs.

We sometimes think of the real line extended by +/- inf, or the complex
plane extended by a single point at infinity.  I'm not sure how to do
sensible arithmetic on a number like inf+3j, that doesn't treat it as
the same number as inf+4j.



More information about the Python-list mailing list