Commit 3ccf166f authored by Hynek Baran's avatar Hynek Baran

`resolve/nonlin/combine/2/rem` fixed (and generating rem(f,g), rem(g,f) when deg f = deg g)

parent 7bea251d
This diff is collapsed.
......@@ -344,9 +344,7 @@ end;
return NULL
else
rfg := op(map2((F,G) -> `resolve/nonlin/combine/2`(F, G) , bs[1], bs[2..-1]));
#rgf := op(map2((F,G) -> `resolve/nonlin/combine/2`(G, F) , bs[1], bs[2..-1])); ### needed by `resolve/nonlin/combine/2/rem`
rr := thisproc(bs[2..-1]);
#return rfg, rgf, rr; ###
return rfg, rr;
fi;
end:
......@@ -363,15 +361,12 @@ end:
LV := F:-LV;
fi;
#if F:-degree >= G:-degree then ### needed by `resolve/nonlin/combine/2/rem`
Reportf(2, ["Combining polynomials in %a^%a*(%a), %a^%a*(%a)", (F:-LV), (F:-degree), (F:-LC), (G:-LV), (G:-degree), (G:-LC)]);
res := `resolve/nonlin/combine/2/tool`(F, G);
if res <> NULL then
res := divideout(numer(res));
fi;
#else ###
# res := NULL;
#fi; ###
Reportf(2, ["Combining polynomials in %a^%a*(%a), %a^%a*(%a)", (F:-LV), (F:-degree), (F:-LC), (G:-LV), (G:-degree), (G:-LC)]);
res := `resolve/nonlin/combine/2/tool`(F, G);
if res <> NULL then
res := op(map(divideout@numer, {res}));
fi;
return res;
end:
......@@ -405,8 +400,19 @@ end:
#end:
`resolve/nonlin/combine/2/rem` := proc (F::record, G::record, $)
### see above "needed by `resolve/nonlin/combine/2/rem`"
### (remainder to be done for both [f,g] and [g,f] when degrees are equal)
local res;
if F:-degree >= G:-degree then
res := `resolve/nonlin/combine/2/rem/1`(F,G);
if F:-degree = G:-degree then
res := res, `resolve/nonlin/combine/2/rem/1`(G,F);
fi;
else
res := `resolve/nonlin/combine/2/rem/1`(G,F);
fi;
return res;
end:
`resolve/nonlin/combine/2/rem/1` := proc (F::record, G::record, $)
local res, resdata;
res := frontend(rem, [F:-expr, G:-expr, F:-LV]);
if type(G:-LC, 'nonzero') then
......
......@@ -107,7 +107,7 @@
</Input>
<Output>
<Text-field style="Line Printed Output" layout="Line Printed Output">Jets 5.92 test1 as of Oct 19, 2018 (2018-10-19 09:42:25)</Text-field>
<Text-field style="Line Printed Output" layout="Line Printed Output">Jets.newresolve v 0.3 as of Oct 2018 (2018-10-29 15:01:07)</Text-field>
<Text-field style="Line Printed Output" layout="Line Printed Output">Jets.newresolve v 0.3 as of Oct 2018 (2018-10-29 15:28:45)</Text-field>
</Output>
</Group>
<Group labelreference="L222" drawlabel="true" applyint="true" applyrational="true" applyexponent="false">
......
......@@ -107,7 +107,7 @@
</Input>
<Output>
<Text-field style="Line Printed Output" layout="Line Printed Output">Jets 5.92 test1 as of Oct 19, 2018 (2018-10-19 09:42:25)</Text-field>
<Text-field style="Line Printed Output" layout="Line Printed Output">Jets.newresolve v 0.3 as of Oct 2018 (2018-10-29 15:01:07)</Text-field>
<Text-field style="Line Printed Output" layout="Line Printed Output">Jets.newresolve v 0.3 as of Oct 2018 (2018-10-29 15:28:45)</Text-field>
</Output>
</Group>
<Group labelreference="L222" drawlabel="true" applyint="true" applyrational="true" applyexponent="false">
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment