Mark Dickinson <dicki...@gmail.com> added the comment:

> The Imaginary type could help to solve other "gotchas".

Yes, it's an attractive proposition from many angles: e.g., multiplying by 1j 
could do the correct quarter-turn rotation in the complex plane, keeping all 
signs correct, so that multiplying a complex number z by 1j 4 times exactly 
recovers z, regardless of nans, infinities and signed zeros.

C99's specification of (optional) imaginary types was supposed to solve exactly 
this problem, but it doesn't look as though it received widespread adoption, 
and I suspect it would have difficult getting traction in Python world, too.

I'll have a PR with a documentation update shortly.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue40269>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to