[SCM] an open source computer algebra system branch, cleanedupstream, updated. 6125e540ca6d66c307958938a9d53b245507c323

Bernhard R. Link brlink at debian.org
Tue Apr 24 15:54:15 UTC 2012


The following commit has been merged in the cleanedupstream branch:
commit 4066e5c76941e608fffaa53491bffbb4ac9fb0e2
Author: Hans Schoenemann <hannes at mathematik.uni-kl.de>
Date:   Mon Mar 26 13:20:17 2012 +0200

    fix: trac.sagemath.org/sage_trac/ticket/7795 (p_Power: very large exponents)

diff --git a/kernel/polys1.cc b/kernel/polys1.cc
index a1e84c4..804287c 100644
--- a/kernel/polys1.cc
+++ b/kernel/polys1.cc
@@ -344,8 +344,8 @@ poly p_Power(poly p, int i, const ring r)
             return p_Pow(p,i,r);
           if ((char_p==0) || (i<=char_p))
             return p_TwoMonPower(p,i,r);
-          poly p_p=p_TwoMonPower(p_Copy(p,r),char_p,r);
-          return p_Mult_q(p_Power(p,i-char_p,r),p_p,r);
+          poly p_p=p_TwoMonPower(p_Copy(p,r),(i/char_p)*char_p,r);
+          return p_Mult_q(p_Power(p,i % char_p,r),p_p,r);
         }
       /*end default:*/
     }

-- 
an open source computer algebra system



More information about the debian-science-commits mailing list