[issue9186] math.log1p(-1.0) produces OverflowError; should be ValueError

Mark Dickinson report at bugs.python.org
Wed Jul 7 12:10:32 CEST 2010


New submission from Mark Dickinson <dickinsm at gmail.com>:

>>> from math import log1p
>>> log1p(-1.0)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
OverflowError: math range error

This should be a ValueError instead.

(Thanks Benjamin for noticing this.)

----------
assignee: mark.dickinson
components: Extension Modules
files: log1p_neg1.patch
keywords: patch
messages: 109468
nosy: benjamin.peterson, mark.dickinson
priority: normal
severity: normal
status: open
title: math.log1p(-1.0) produces OverflowError; should be ValueError
type: behavior
versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2
Added file: http://bugs.python.org/file17893/log1p_neg1.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9186>
_______________________________________


More information about the Python-bugs-list mailing list