This is an automated email from the git hooks/post-receive script.

ppm-guest pushed a commit to annotated tag v0.13
in repository libmath-prime-util-perl.

commit baf304f7f5163d2a3ba61089274b9da6b5c26082
Author: Dana Jacobsen <d...@acm.org>
Date:   Mon Nov 5 01:47:32 2012 -0800

    Fix compiler warnings
---
 XS.xs  |  1 -
 util.c | 14 +++++++-------
 2 files changed, 7 insertions(+), 8 deletions(-)

diff --git a/XS.xs b/XS.xs
index c846c6b..cc2de61 100644
--- a/XS.xs
+++ b/XS.xs
@@ -196,7 +196,6 @@ erat_primes(IN UV low, IN UV high)
 void
 _XS_factor(IN UV n)
   PPCODE:
-    UV orign = n;
     if (n < 4) {                        /* If n is 0-3, we're done. */
       XPUSHs(sv_2mortal(newSVuv( n )));
     } else if (n < 2000000) {           /* For small n, just trial division */
diff --git a/util.c b/util.c
index 8471457..766274d 100644
--- a/util.c
+++ b/util.c
@@ -640,8 +640,8 @@ static long double const li2 = 
1.04516378011749278484458888919461313652261557815
 double _XS_ExponentialIntegral(double x) {
   long double const tol = 1e-16;
   long double val, term;
-  KAHAN_INIT(sum);
   unsigned int n;
+  KAHAN_INIT(sum);
 
   if (x == 0) croak("Invalid input to ExponentialIntegral:  x must be != 0");
 
@@ -697,8 +697,8 @@ double _XS_ExponentialIntegral(double x) {
     val = sum;
   } else {
     /* Asymptotic divergent series */
-    term = 1.0;
     long double invx = 1.0L / x;
+    term = 1.0;
     for (n = 1; n <= 200; n++) {
       long double last_term = term;
       term = term * ( (long double)n * invx );
@@ -777,9 +777,9 @@ static const long double riemann_zeta_table[] = {
 /* Riemann Zeta on the real line.  Compare to Math::Cephes::zetac */
 long double ld_riemann_zeta(long double x) {
   long double const tol = 1e-17;
-  KAHAN_INIT(sum);
   long double term;
   int k;
+  KAHAN_INIT(sum);
 
   if (x < 0.5) croak("Invalid input to RiemannZeta:  x must be >= 0.5");
 
@@ -828,9 +828,9 @@ long double ld_riemann_zeta(long double x) {
       if (term < tol*sum) break;
     }
     KAHAN_SUM(sum, powl(3, -x) );
-    long double t = 1.0L / (1.0L - powl(2, -x));
-    sum *= t;
-    sum += (t - 1.0L);
+    term = 1.0L / (1.0L - powl(2, -x));
+    sum *= term;
+    sum += (term - 1.0L);
     /* printf("zeta(%lf) = %.15lf in %d iterations\n", x, sum, k); */
 
   }
@@ -840,9 +840,9 @@ long double ld_riemann_zeta(long double x) {
 
 double _XS_RiemannR(double x) {
   long double const tol = 1e-16;
-  KAHAN_INIT(sum);
   long double part_term, term, flogx;
   unsigned int k;
+  KAHAN_INIT(sum);
 
   if (x <= 0) croak("Invalid input to ReimannR:  x must be > 0");
 

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-perl/packages/libmath-prime-util-perl.git

_______________________________________________
Pkg-perl-cvs-commits mailing list
Pkg-perl-cvs-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits

Reply via email to