Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
965697fc
Commit
965697fc
authored
Apr 26, 2003
by
Tim Peters
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clarified new text about math exceptions.
Bugfix candidate.
parent
4931130f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
Doc/lib/libmath.tex
Doc/lib/libmath.tex
+9
-4
No files found.
Doc/lib/libmath.tex
View file @
965697fc
...
...
@@ -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
}
is
n'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}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment