Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 43807fe

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

File tree

1 file changed

+2
-2
lines changed
Filter options

1 file changed

+2
-2
lines changed

‎Objects/longobject.c

Copy file name to clipboardExpand all lines: Objects/longobject.c
+2-2Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.