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
f4fd79ca
Commit
f4fd79ca
authored
Aug 26, 2004
by
Raymond Hettinger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Small wording fixups.
parent
ca9111ee
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
Doc/lib/libdecimal.tex
Doc/lib/libdecimal.tex
+5
-5
No files found.
Doc/lib/libdecimal.tex
View file @
f4fd79ca
...
...
@@ -839,7 +839,7 @@ fixed precision.
The effects of round-off error can be amplified by the addition or subtraction
of nearly offsetting quantities resulting in loss of significance. Knuth
provides two instructive examples where rounded floating point arithmetic with
insufficient precision causes the break
down of the associative and
insufficient precision causes the breakdown of the associative and
distributive properties of addition:
\begin{verbatim}
...
...
@@ -893,7 +893,7 @@ The infinities are signed (affine) and can be used in arithmetic operations
where they get treated as very large, indeterminate numbers. For instance,
adding a constant to infinity gives another infinite result.
Some operations are indeterminate and return
\constant
{
NaN
}
or when
the
Some operations are indeterminate and return
\constant
{
NaN
}
, or if
the
\exception
{
InvalidOperation
}
signal is trapped, raise an exception. For
example,
\code
{
0/0
}
returns
\constant
{
NaN
}
which means ``not a number''. This
variety of
\constant
{
NaN
}
is quiet and, once created, will flow through other
...
...
@@ -909,11 +909,11 @@ result needs to interrupt a calculation for special handling.
The signed zeros can result from calculations that underflow.
They keep the sign that would have resulted if the calculation had
been carried out to greater precision. Since their magnitude is
zero,
the positive and negative zero
are treated as equal and their
zero,
both positive and negative zeros
are treated as equal and their
sign is informational.
In addition to the two signed zeros which are distinct
,
yet equal,
there are various representations of zero with differing precisions
,
In addition to the two signed zeros which are distinct yet equal,
there are various representations of zero with differing precisions
yet equivalent in value. This takes a bit of getting used to. For
an eye accustomed to normalized floating point representations, it
is not immediately obvious that the following calculation returns
...
...
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