Skip to content

Commit 29d549e

Browse files
Update Doc/c-api/float.rst
Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
1 parent 86b35f1 commit 29d549e

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

Doc/c-api/float.rst

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,12 +92,7 @@ Floating-Point Objects
9292
9393
On most platforms, this is equivalent to the following::
9494
95-
if (copysign(1., sign) == 1.) {
96-
return PyFloat_FromDouble(INFINITY);
97-
}
98-
else {
99-
return PyFloat_FromDouble(-INFINITY);
100-
}
95+
return PyFloat_FromDouble(copysign(INFINITY, sign));
10196
10297
10398
Pack and Unpack functions

0 commit comments

Comments
 (0)