summaryrefslogtreecommitdiffstats
path: root/Objects/longobject.c
diff options
context:
space:
mode:
authorAyato Hayashi <go12limchangyong@gmail.com>2024-05-23 02:11:11 (GMT)
committerGitHub <noreply@github.com>2024-05-23 02:11:11 (GMT)
commit43807fec8d38a0400c7967baad587da3e89f8dcc (patch)
treee56a9df325edf92fce6fd398cb3dd00d1575a499 /Objects/longobject.c
parent07df93de73b6bdd4f80cd9e29834d761a0882622 (diff)
downloadcpython-43807fec8d38a0400c7967baad587da3e89f8dcc.zip
cpython-43807fec8d38a0400c7967baad587da3e89f8dcc.tar.gz
cpython-43807fec8d38a0400c7967baad587da3e89f8dcc.tar.bz2
Tiny fix: Update link for HAC algorithm (gh-118546)
Diffstat (limited to 'Objects/longobject.c')
-rw-r--r--Objects/longobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/longobject.c b/Objects/longobject.c
index ce3fd6b..b0456a3 100644
--- a/Objects/longobject.c
+++ b/Objects/longobject.c
@@ -3795,7 +3795,7 @@ x_mul(PyLongObject *a, PyLongObject *b)
memset(z->long_value.ob_digit, 0, _PyLong_DigitCount(z) * sizeof(digit));
if (a == b) {
/* Efficient squaring per HAC, Algorithm 14.16:
- * http://www.cacr.math.uwaterloo.ca/hac/about/chap14.pdf
+ * https://cacr.uwaterloo.ca/hac/about/chap14.pdf
* Gives slightly less than a 2x speedup when a == b,
* via exploiting that each entry in the multiplication
* pyramid appears twice (except for the size_a squares).
@@ -5003,7 +5003,7 @@ long_pow(PyObject *v, PyObject *w, PyObject *x)
}
else if (i <= HUGE_EXP_CUTOFF / PyLong_SHIFT ) {
/* Left-to-right binary exponentiation (HAC Algorithm 14.79) */
- /* http://www.cacr.math.uwaterloo.ca/hac/about/chap14.pdf */
+ /* https://cacr.uwaterloo.ca/hac/about/chap14.pdf */
/* Find the first significant exponent bit. Search right to left
* because we're primarily trying to cut overhead for small powers.