A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2003-August/037421.html below:

[Python-Dev] histerical math.log(zero)

[Python-Dev] histerical math.log(zero) [Python-Dev] histerical math.log(zero)Samuele Pedroni pedronis at bluewin.ch
Mon Aug 4 18:57:29 EDT 2003
math.log raises different unrelated exceptions depending on the type of a 
zero argument:

 >>> math.log(0)

Traceback (most recent call last):
   File "<pyshell#1>", line 1, in -toplevel-
     math.log(0)
OverflowError: math range error
 >>> math.log(0L)

Traceback (most recent call last):
   File "<pyshell#2>", line 1, in -toplevel-
     math.log(0L)
ValueError: math domain error

 >>> math.log(0.0)

Traceback (most recent call last):
   File "<pyshell#4>", line 1, in -toplevel-
     math.log(0.0)
OverflowError: math range error

should this stay this way? notice that the (only) common ancestor of 
OverflowError and ValueError is StandardError.

regards.


More information about the Python-Dev mailing list

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