This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: float('inf')**2 != inf
Type: behavior Stage:
Components: Interpreter Core Versions: Python 2.6
process
Status: closed Resolution: duplicate
Dependencies: Superseder: float('nan')**2 != nan. float('nan')**2 error 33 on windows
View: 7534
Assigned To: Nosy List: mark.dickinson, mdonolo, tim.peters
Priority: normal Keywords:

Created on 2009-12-17 19:27 by mdonolo, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg96527 - (view) Author: Marcos Donolo (mdonolo) Date: 2009-12-17 19:27
The ** operator produces an error when it gets inf as an argument.
if I try.
>>>a=float('inf')
>>>a*a 
inf
-but if I try 
>>>a**2 
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OverflowError: (34, 'Result too large')
I should get inf too.
msg96528 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2009-12-17 19:32
This is essentially the same issue as issue7534, but for infinities 
instead of nans.  I'm closing this and folding the issue into that one.
History
Date User Action Args
2022-04-11 14:56:55adminsetgithub: 51785
2009-12-17 19:32:33mark.dickinsonsetstatus: open -> closed

nosy: + mark.dickinson
messages: + msg96528

superseder: float('nan')**2 != nan. float('nan')**2 error 33 on windows
resolution: duplicate
2009-12-17 19:27:46mdonolocreate