Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update Doc/c-api/float.rst
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
  • Loading branch information
ZeroIntensity and skirpichev authored Nov 5, 2025
commit 29d549e819ef5e7c6e7248e52cfef6ce05460014
7 changes: 1 addition & 6 deletions Doc/c-api/float.rst
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,7 @@ Floating-Point Objects

On most platforms, this is equivalent to the following::

if (copysign(1., sign) == 1.) {
return PyFloat_FromDouble(INFINITY);
}
else {
return PyFloat_FromDouble(-INFINITY);
}
return PyFloat_FromDouble(copysign(INFINITY, sign));


Pack and Unpack functions
Expand Down
Loading