summaryrefslogtreecommitdiff
path: root/mpn/generic
diff options
context:
space:
mode:
authorMarco Bodrato <bodrato@mail.dm.unipi.it>2020-02-06 17:49:44 +0100
committerMarco Bodrato <bodrato@mail.dm.unipi.it>2020-02-06 17:49:44 +0100
commit42473ba3511937346246eef36ce7e3ef373a6215 (patch)
tree55b4131968fec9a06996b1db8051d6ae9dea05f7 /mpn/generic
parent2482b89c0d8aca660010a39009cc943d4f8885c3 (diff)
downloadgmp-42473ba3511937346246eef36ce7e3ef373a6215.tar.gz
mpn/generic/perfsqr.c: Small changes in unused code...
Diffstat (limited to 'mpn/generic')
-rw-r--r--mpn/generic/perfsqr.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/mpn/generic/perfsqr.c b/mpn/generic/perfsqr.c
index 38a1a91ed..1ea5c84b4 100644
--- a/mpn/generic/perfsqr.c
+++ b/mpn/generic/perfsqr.c
@@ -194,7 +194,7 @@ mpn_perfect_square_p (mp_srcptr up, mp_size_t usize)
#if 0
/* Check that we have even multiplicity of 2, and then check that the rest is
a possible perfect square. Leave disabled until we can determine this
- really is an improvement. It it is, it could completely replace the
+ really is an improvement. If it is, it could completely replace the
simple probe above, since this should throw out more non-squares, but at
the expense of somewhat more cycles. */
{
@@ -207,8 +207,7 @@ mpn_perfect_square_p (mp_srcptr up, mp_size_t usize)
if ((cnt & 1) != 0)
return 0; /* return of not even multiplicity of 2 */
lo >>= cnt; /* shift down to align lowest non-zero bit */
- lo >>= 1; /* shift away lowest non-zero bit */
- if ((lo & 3) != 0)
+ if ((lo & 6) != 0)
return 0;
}
#endif