summaryrefslogtreecommitdiffstats
path: root/Doc/lib
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2003-04-26 15:11:08 (GMT)
committerTim Peters <tim.peters@gmail.com>2003-04-26 15:11:08 (GMT)
commit965697fc4bd3fc3dd5f18ff25dac3f1c7487e0ff (patch)
treeb87c975372469039659d4a426c2fa5cfd92ddfff /Doc/lib
parent4931130f129f9981cc82afcacabe0b0757191e66 (diff)
downloadcpython-965697fc4bd3fc3dd5f18ff25dac3f1c7487e0ff.zip
cpython-965697fc4bd3fc3dd5f18ff25dac3f1c7487e0ff.tar.gz
cpython-965697fc4bd3fc3dd5f18ff25dac3f1c7487e0ff.tar.bz2
Clarified new text about math exceptions.
Bugfix candidate.
Diffstat (limited to 'Doc/lib')
-rw-r--r--Doc/lib/libmath.tex13
1 files changed, 9 insertions, 4 deletions
diff --git a/Doc/lib/libmath.tex b/Doc/lib/libmath.tex
index 5f1d86f..dc917c6 100644
--- a/Doc/lib/libmath.tex
+++ b/Doc/lib/libmath.tex
@@ -146,13 +146,18 @@ The mathematical constant \emph{e}.
\end{datadesc}
\begin{notice}
- Specific exceptions raised in assorted error cases (and even whether some
+ The \module{math} module consists mostly of thin wrappers around
+ the platform C math library functions. Behavior in exceptional cases is
+ loosely specified by the C standards, and Python inherits much of its
+ math-function error-reporting behavior from the platform C
+ implementation. As a result,
+ the specific exceptions raised in error cases (and even whether some
arguments are considered to be exceptional at all) are not defined in any
useful cross-platform or cross-release way. For example, whether
\code{math.log(0)} returns \code{-Inf} or raises \exception{ValueError} or
- \exception{OverflowError} is both platform- and release-dependent, and in
- cases where \code{math.log(0)} raises an \exception{OverflowError},
- \code{math.log(0L)} often raises a \exception{ValueError}.
+ \exception{OverflowError} isn't defined, and in
+ cases where \code{math.log(0)} raises \exception{OverflowError},
+ \code{math.log(0L)} may raise \exception{ValueError} instead.
\end{notice}
\begin{seealso}