David DiCato wrote: > … then we see that ‘inf’ is printed in both cases. The standard library > tests (for example, test_cmath.py:test_abs()) seem to test for this > behavior as well, and FWIW, I personally agree with this convention. > However, the math module’s documentation for both 2.6 and 3.1 states, > “All functions return a quiet NaN if at least one of the args is NaN.” > > math.pow(1.0, nan) is another such exception to the rule. Perhaps the > documentation should be updated to reflect this. This sounds like a legitimate documentation bug for the tracker at bugs.python.org (bug reports tend to get lost/forgotten if they only exist on the mailing list). Cheers, Nick. -- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia ---------------------------------------------------------------
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