version 1.5, 2019/03/13 08:01:05 |
version 1.6, 2019/03/18 07:00:33 |
|
|
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* DEVELOPER SHALL HAVE NO LIABILITY IN CONNECTION WITH THE USE, |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* PERFORMANCE OR NON-PERFORMANCE OF THE SOFTWARE. |
* |
* |
* $OpenXM: OpenXM_contrib2/asir2018/builtin/dp.c,v 1.4 2018/11/12 07:59:33 noro Exp $ |
* $OpenXM: OpenXM_contrib2/asir2018/builtin/dp.c,v 1.5 2019/03/13 08:01:05 noro Exp $ |
*/ |
*/ |
#include "ca.h" |
#include "ca.h" |
#include "base.h" |
#include "base.h" |
Line 691 void mhp_to_hf(VL vl,P hp,int n,P *plist,VECT *head,P |
|
Line 691 void mhp_to_hf(VL vl,P hp,int n,P *plist,VECT *head,P |
|
} |
} |
if ( NUM(q) ) qd = 0; |
if ( NUM(q) ) qd = 0; |
else qd = ZTOS(DEG(DC(q))); |
else qd = ZTOS(DEG(DC(q))); |
if ( qd ) { |
if ( s == 0 ) { |
topdc = 0; |
MKVECT(hfhead,qd+1); |
for ( i = 0; i < qd; i++ ) { |
for ( i = 0; i <= qd; i++ ) { |
NEWDC(dc); NEXT(dc) = topdc; |
coefp(q,i,(P *)&BDY(hfhead)[i]); |
ibin(i+s-1,s-1,&COEF(dc)); |
|
STOZ(i,d); DEG(dc) = d; |
|
topdc = dc; |
|
} |
} |
MKP(VR(tv),topdc,h); |
*head = hfhead; |
mulp(CO,h,q,&hphead); |
*hf = 0; |
|
*den = ONE; |
|
} else { |
|
if ( qd ) { |
|
topdc = 0; |
|
for ( i = 0; i < qd; i++ ) { |
|
NEWDC(dc); NEXT(dc) = topdc; |
|
ibin(i+s-1,s-1,&COEF(dc)); |
|
STOZ(i,d); DEG(dc) = d; |
|
topdc = dc; |
|
} |
|
MKP(VR(tv),topdc,h); |
|
mulp(CO,h,q,&hphead); |
|
} |
|
MKVECT(hfhead,qd); |
|
for ( i = 0; i < qd; i++ ) |
|
coefp(hphead,i,(P *)&BDY(hfhead)[i]); |
|
*head = hfhead; |
|
hpoly = 0; |
|
makevar("n",&nv); |
|
for ( i = 0; i <= qd; i++ ) { |
|
coefp(q,i,&ai); |
|
bp = binpoly(nv,s-i-1,s-1); |
|
mulp(CO,ai,bp,&tt); |
|
addp(CO,hpoly,tt,&w); |
|
hpoly = w; |
|
} |
|
*hf = hpoly; |
|
factorialz(s-1,den); |
} |
} |
MKVECT(hfhead,qd); |
|
for ( i = 0; i < qd; i++ ) |
|
coefp(hphead,i,(P *)&BDY(hfhead)[i]); |
|
*head = hfhead; |
|
hpoly = 0; |
|
makevar("n",&nv); |
|
for ( i = 0; i <= qd; i++ ) { |
|
coefp(q,i,&ai); |
|
bp = binpoly(nv,s-i-1,s-1); |
|
mulp(CO,ai,bp,&tt); |
|
addp(CO,hpoly,tt,&w); |
|
hpoly = w; |
|
} |
|
*hf = hpoly; |
|
factorialz(s-1,den); |
|
} |
} |
} |
} |
|
|