https://gcc.gnu.org/g:6ba996c6580cc443ceb9a0848d905431d972ca45
commit r17-2450-g6ba996c6580cc443ceb9a0848d905431d972ca45 Author: Eric Botcazou <[email protected]> Date: Thu Jul 16 13:02:52 2026 +0200 Fix typo in comment of invert_mod2n The typo is just one letter 'Z' -> 'X', but a 1-character change is a waste of resources so I have beefed up the comment with a few references. gcc/ * expmed.cc (invert_mod2n): Fix typo in comment and add references. Diff: --- gcc/expmed.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gcc/expmed.cc b/gcc/expmed.cc index 4285c846bf2d..b87d06bc9a43 100644 --- a/gcc/expmed.cc +++ b/gcc/expmed.cc @@ -3838,9 +3838,9 @@ invert_mod2n (unsigned HOST_WIDE_INT x, int n) { gcc_assert ((x & 1) == 1); - /* The algorithm notes that the choice Y = Z satisfies X*Y == 1 mod 2^3, - since X is odd. Then each iteration doubles the number of bits of - significance in Y. */ + /* The algorithm notes that the choice Y = X satisfies X*Y == 1 mod 2^3, + since X is odd. Then each Newton-Raphson iteration doubles the number + of bits of significance in Y (Hensel's lemma). */ const unsigned HOST_WIDE_INT mask = (n == HOST_BITS_PER_WIDE_INT
