Skip to content

Commit 1777daa

Browse files
author
Jon-Patrick Cook
committed
Cleanup comments and whitespace in mathmodule.c
1 parent 974d2db commit 1777daa

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

Modules/mathmodule.c

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -861,12 +861,12 @@ is_error(double x, int raise_edom)
861861
should return a zero on underflow, and +- HUGE_VAL on
862862
overflow, so testing the result for zero suffices to
863863
distinguish the cases).
864-
864+
865865
On some platforms (Ubuntu/ia64) it seems that errno can be
866866
set to ERANGE for subnormal results that do *not* underflow
867867
to zero. So to be safe, we'll ignore ERANGE whenever the
868868
function result is less than 1.5 in absolute value.
869-
869+
870870
bpo-46018: Changed to 1.5 to ensure underflows in expm1()
871871
are correctly detected, since the function may underflow
872872
toward -1.0 rather than 0.0. */
@@ -1574,7 +1574,6 @@ of correctness (using Lean) of an equivalent recursive algorithm can be found
15741574
15751575
https://github.com/mdickinson/snippets/blob/master/proofs/isqrt/src/isqrt.lean
15761576
1577-
15781577
Here's Python code equivalent to the C implementation below:
15791578
15801579
def isqrt(n):
@@ -1599,7 +1598,6 @@ Here's Python code equivalent to the C implementation below:
15991598
16001599
return a - (a*a > n)
16011600
1602-
16031601
Sketch of proof of correctness
16041602
------------------------------
16051603
@@ -3213,7 +3211,6 @@ math_isnan_impl(PyObject *module, double x)
32133211
return PyBool_FromLong((long)isnan(x));
32143212
}
32153213

3216-
32173214
/*[clinic input]
32183215
math.isinf
32193216
@@ -3230,7 +3227,6 @@ math_isinf_impl(PyObject *module, double x)
32303227
return PyBool_FromLong((long)isinf(x));
32313228
}
32323229

3233-
32343230
/*[clinic input]
32353231
math.isclose -> bool
32363232
@@ -3712,7 +3708,7 @@ perm_comb_small(unsigned long long n, unsigned long long k, int iscomb)
37123708
}
37133709

37143710
/* For larger n use recursive formulas:
3715-
3711+
37163712
P(n, k) = P(n, j) * P(n-j, k-j)
37173713
C(n, k) = C(n, j) * C(n-j, k-j) // C(k, j) */
37183714
unsigned long long j = k / 2;

0 commit comments

Comments
 (0)