[libmath-prime-util-perl] 16/54: euler_phi(0, n) had wrong [1] when n >= 100
Partha P. Mukherjee
ppm-guest at moszumanska.debian.org
Thu May 21 18:52:08 UTC 2015
This is an automated email from the git hooks/post-receive script.
ppm-guest pushed a commit to annotated tag v0.38
in repository libmath-prime-util-perl.
commit 382d4e2a66e5a500d0f92803f0381fc03d709308
Author: Dana Jacobsen <dana at acm.org>
Date: Sun Feb 2 20:25:19 2014 -0800
euler_phi(0,n) had wrong [1] when n >= 100
---
util.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/util.c b/util.c
index f86c103..9c2df00 100644
--- a/util.c
+++ b/util.c
@@ -930,6 +930,7 @@ UV* _totient_range(UV lo, UV hi) {
for (i = lo | 1; i <= hi; i += 2)
if (totients[i-lo] == i)
totients[i-lo]--;
+ if (lo <= 1) totients[1-lo] = 1;
return totients;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libmath-prime-util-perl.git
More information about the Pkg-perl-cvs-commits
mailing list