Skip to content

Commit 43807fe

Browse files
authored
Tiny fix: Update link for HAC algorithm (gh-118546)
1 parent 07df93d commit 43807fe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Objects/longobject.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3795,7 +3795,7 @@ x_mul(PyLongObject *a, PyLongObject *b)
37953795
memset(z->long_value.ob_digit, 0, _PyLong_DigitCount(z) * sizeof(digit));
37963796
if (a == b) {
37973797
/* Efficient squaring per HAC, Algorithm 14.16:
3798-
* http://www.cacr.math.uwaterloo.ca/hac/about/chap14.pdf
3798+
* https://cacr.uwaterloo.ca/hac/about/chap14.pdf
37993799
* Gives slightly less than a 2x speedup when a == b,
38003800
* via exploiting that each entry in the multiplication
38013801
* pyramid appears twice (except for the size_a squares).
@@ -5003,7 +5003,7 @@ long_pow(PyObject *v, PyObject *w, PyObject *x)
50035003
}
50045004
else if (i <= HUGE_EXP_CUTOFF / PyLong_SHIFT ) {
50055005
/* Left-to-right binary exponentiation (HAC Algorithm 14.79) */
5006-
/* http://www.cacr.math.uwaterloo.ca/hac/about/chap14.pdf */
5006+
/* https://cacr.uwaterloo.ca/hac/about/chap14.pdf */
50075007

50085008
/* Find the first significant exponent bit. Search right to left
50095009
* because we're primarily trying to cut overhead for small powers.

0 commit comments

Comments
 (0)