[SCM] an open source computer algebra system branch, cleanedupstream, updated. 6125e540ca6d66c307958938a9d53b245507c323
Bernhard R. Link
brlink at debian.org
Tue Apr 24 15:54:35 UTC 2012
The following commit has been merged in the cleanedupstream branch:
commit d33a2d55af8a535f5ca82e170d3f6c9eefe7ab45
Author: Hans Schoenemann <hannes at mathematik.uni-kl.de>
Date: Fri Mar 30 18:13:55 2012 +0200
fix: deg(p)==0 is not the same as being constant (see matrix order)
diff --git a/Singular/LIB/primdec.lib b/Singular/LIB/primdec.lib
index 5f14b60..d9971c2 100644
--- a/Singular/LIB/primdec.lib
+++ b/Singular/LIB/primdec.lib
@@ -287,37 +287,10 @@ EXAMPLE: example factor; shows an example
intvec @v, at w;
int @j, at k, at n;
- if(deg(p)<=1)
- {
- @i=ideal(p);
- @v=1;
- @l[1]=@i;
- @l[2]=@v;
- return(@l);
- }
- if (size(p)==1)
- {
- @w=leadexp(p);
- for(@j=1;@j<=nvars(basering);@j++)
- {
- if(@w[@j]!=0)
- {
- @k++;
- @v[@k]=@w[@j];
- @i=@i+ideal(var(@j));
- }
- }
- @l[1]=@i;
- @l[2]=@v;
- return(@l);
- }
- // @l=factorize(p,2);
@l=factorize(p);
- // if(npars(basering)>0)
- // {
for(@j=1;@j<=size(@l[1]);@j++)
{
- if(deg(@l[1][@j])==0)
+ if(leadcoef(@l[1][@j])==@l[1][@j])
{
@n++;
}
@@ -336,7 +309,7 @@ EXAMPLE: example factor; shows an example
int pleh;
for(@j=1;@j<=size(@l[1]);@j++)
{
- if(deg(@l[1][@j])!=0)
+ if(leadcoef(@l[1][@j])!=@l[1][@j])
{
@k++;
@i=@i+ideal(@l[1][@j]);
--
an open source computer algebra system
More information about the debian-science-commits
mailing list