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
5818e012
Commit
5818e012
authored
Jan 13, 2010
by
Mark Dickinson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clarify that sulp expects a nonnegative input, but that +0.0 is fine.
parent
b26d56ac
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
Python/dtoa.c
Python/dtoa.c
+7
-5
No files found.
Python/dtoa.c
View file @
5818e012
...
...
@@ -1130,11 +1130,11 @@ quorem(Bigint *b, Bigint *S)
return
q
;
}
/* version of ulp(x) that takes bc.scale into account.
/*
sulp(x) is a
version of ulp(x) that takes bc.scale into account.
Assuming that x is finite and non
zero, and x / 2^bc.scale is exactly
representable as a double, sulp(x) is equivalent to 2^bc.scale * ulp(x /
2^bc.scale). */
Assuming that x is finite and non
negative (positive zero is fine
here) and x / 2^bc.scale is exactly representable as a double,
sulp(x) is equivalent to 2^bc.scale * ulp(x /
2^bc.scale). */
static
double
sulp
(
U
*
x
,
BCinfo
*
bc
)
...
...
@@ -1147,8 +1147,10 @@ sulp(U *x, BCinfo *bc)
word1
(
&
u
)
=
0
;
return
u
.
d
;
}
else
else
{
assert
(
word0
(
x
)
||
word1
(
x
));
/* x != 0.0 */
return
ulp
(
x
);
}
}
/* The bigcomp function handles some hard cases for strtod, for inputs
...
...
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