SF.net SVN: fricas:[2651] trunk

0 views
Skip to first unread message

wheb...@users.sourceforge.net

unread,
Mar 14, 2020, 2:56:05 PM3/14/20
to fricas...@googlegroups.com
Revision: 2651
http://sourceforge.net/p/fricas/code/2651
Author: whebisch
Date: 2020-03-14 18:56:00 +0000 (Sat, 14 Mar 2020)
Log Message:
-----------
Remove 'modularGcd'

Modified Paths:
--------------
trunk/ChangeLog
trunk/src/algebra/modgcd.spad
trunk/src/input/fixed.input

Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2020-03-14 18:41:53 UTC (rev 2650)
+++ trunk/ChangeLog 2020-03-14 18:56:00 UTC (rev 2651)
@@ -1,5 +1,9 @@
2020-03-14 Waldek Hebisch <heb...@math.uni.wroc.pl>

+ * src/algebra/modgcd.spad: Remove 'modularGcd'
+
+2020-03-14 Waldek Hebisch <heb...@math.uni.wroc.pl>
+
* src/algebra/rdeefx.spad: Fix error due to
handling of gamma incomplete


Modified: trunk/src/algebra/modgcd.spad
===================================================================
--- trunk/src/algebra/modgcd.spad 2020-03-14 18:41:53 UTC (rev 2650)
+++ trunk/src/algebra/modgcd.spad 2020-03-14 18:56:00 UTC (rev 2651)
@@ -23,9 +23,6 @@
modularGcdPrimitive : List BP -> BP
++ modularGcdPrimitive(listf) computes the gcd of the list
++ of primitive polynomials listf by modular methods.
- modularGcd : List BP -> BP
- ++ modularGcd(listf) computes the gcd of the list of polynomials
- ++ listf by modular methods.
reduction : (BP, R) -> BP
++ reduction(f, p) reduces the coefficients of the polynomial f
++ modulo the prime p.
@@ -67,33 +64,6 @@
g := modGcdPrimitive(g, f)
g

- -- gcd for univariate polynomials
- modularGcd(listf : List BP) : BP ==
- listf := remove!(0$BP, listf)
- empty? listf => 0$BP
- # listf = 1 => first listf
- minpol := 1$BP
- -- extract a monomial gcd
- mdeg := "min"/[minimumDegree f for f in listf]
- if mdeg>0 then
- minpol1 := monomial(1, mdeg)
- listf := [(f exquo minpol1)::BP for f in listf]
- minpol := minpol*minpol1
- listdeg := [degree f for f in listf ]
- -- make the polynomials primitive
- listCont := [content f for f in listf]
- contgcd := gcd listCont
- -- make the polynomials primitive
- listf := [(f exquo cf)::BP for f in listf for cf in listCont]
- minpol := contgcd*minpol
- ans : BP :=
- --one polynomial is constant
- member?(1, listf) => 1
- --one polynomial is linear
- member?(1, listdeg) => lincase(listdeg, listf)
- modularGcdPrimitive listf
- minpol*ans
-
-- local functions --

--one polynomial is linear, remark that they are primitive

Modified: trunk/src/input/fixed.input
===================================================================
--- trunk/src/input/fixed.input 2020-03-14 18:41:53 UTC (rev 2650)
+++ trunk/src/input/fixed.input 2020-03-14 18:56:00 UTC (rev 2651)
@@ -239,7 +239,7 @@
myNextPrime: (INT,NNI) -> INT
myNextPrime(x,n)==nextPrime(x)$PRIMES(INT)
-- runs forever due to algebra bug in handling leading coefficients
-modularGcd([p,q])$InnerModularGcd(INT,UP(x,INT),67108859,myNextPrime)
+modularGcdPrimitive([p,q])$InnerModularGcd(INT,UP(x,INT),67108859,myNextPrime)

-------------------------------------------------------------------
-- dewar/10/02/92

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.

Reply all
Reply to author
Forward
0 new messages