在 Python 3.10.9 中,此示例引发OverflowError: complex exponentiation:
OverflowError: complex exponentiation
complex("inf") ** 1
但这是有效的,评估为(nan+nanj):
(nan+nanj)
complex("inf") ** 2
为什么会这样?有需要报告的错误吗?
python infinity complextype
complextype ×1
infinity ×1
python ×1