为什么在 Python 中会发生这种情况?
\nfloat('inf') == float('inf')返回True,float('inf') + float('inf') == float('inf')返回True,float('inf') * float('inf') == float('inf')返回True,float('inf') - float('inf') == float('inf')返回False,float('inf') / float('inf') == float('inf')返回False。如果我考虑限制,我最好的猜测与此操作的结果有关:
\nlim x\xe2\x86\x92+\xe2\x88\x9e (f(x) \xe2\x96\xa2 g(x)) 其中 lim x\xe2\x86\x92+\xe2\x88\x9e f(x) = +\xe2\x88\x9e 和 lim x\xe2\x86\x92+\xe2\x88\x9e g(x) = +\xe2\x88\x9e,如果 \xe2\x96\ 则返回 +\xe2\x88\x9e xa2 是 + 或 *,但如果 \xe2\x96\xa2 是 - 或 …