diff Doc/lib/libmath.tex @ 28859:103faa0c2e1e legacy-trunk

Clarified new text about math exceptions. Bugfix candidate.
author Tim Peters <tim.peters@gmail.com>
date Sat, 26 Apr 2003 15:11:08 +0000
parents b62d87816976
children 6392e8437588
line wrap: on
line diff
--- a/Doc/lib/libmath.tex	Sat Apr 26 14:53:01 2003 +0000
+++ b/Doc/lib/libmath.tex	Sat Apr 26 15:11:08 2003 +0000
@@ -146,13 +146,18 @@
 \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}