[Samuele Pedroni] > I was asking this because I have just finished making jython handle > log(long) itself too. And I noticed that test_long is picky about the > ValueError thing. It could test for one of (ValueError, OverflowError, ZeroDivisionError) instead, and also count no exception as a success. We probably see all 4 of those behaviors in CPython across platforms for log(0.0). Python-the-language doesn't really define exceptional math behaviors. > I should have read the manual, sorry. I was more wondering that > there's no encompassing math exception. Ask Guido <wink>: CPython started life with "classic" (pre-754) libms, where ERANGE got mapped to OverflowError and EDOM to ValueError. IOW, there has never been an encompassing math exception. ArithmeticError may have been an attempt to create one, but ValueError doesn't derive from it so if that was the plan, it didn't work.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4