[BACK]Return to poly.texi CVS log [TXT][DIR] Up to [local] / OpenXM / src / asir-doc / parts / builtin

Diff for /OpenXM/src/asir-doc/parts/builtin/poly.texi between version 1.3 and 1.8

version 1.3, 2002/09/03 01:50:59 version 1.8, 2004/05/15 08:25:12
Line 1 
Line 1 
 @comment $OpenXM: OpenXM/src/asir-doc/parts/builtin/poly.texi,v 1.2 1999/12/21 02:47:34 noro Exp $  @comment $OpenXM: OpenXM/src/asir-doc/parts/builtin/poly.texi,v 1.7 2003/12/23 10:41:10 ohara Exp $
 \BJP  \BJP
 @node $BB?9`<0$*$h$SM-M}<0$N1i;;(B,,, $BAH$_9~$_H!?t(B  @node $BB?9`<0$*$h$SM-M}<0$N1i;;(B,,, $BAH$_9~$_H!?t(B
 @section $BB?9`<0(B, $BM-M}<0$N1i;;(B  @section $BB?9`<0(B, $BM-M}<0$N1i;;(B
Line 21 
Line 21 
 * %::  * %::
 * subst psubst::  * subst psubst::
 * diff::  * diff::
   * ediff::
 * res::  * res::
 * fctr sqfr::  * fctr sqfr::
 * modfctr::  * modfctr::
Line 451  objects which are created under different variable ord
Line 452  objects which are created under different variable ord
   
 @example  @example
 [0] ord();  [0] ord();
 [x,y,z,u,v,w,p,q,r,s,t,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,_x,_y,_z,_u,_v,_w,_p,  [x,y,z,u,v,w,p,q,r,s,t,a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,_x,_y,_z,_u,_v,
 _q,_r,_s,_t,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n,_o,exp(_x),(_x)^(_y),  _w,_p,_q,_r,_s,_t,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n,_o,
 log(_x),(_x)^(_y-1),cos(_x),sin(_x),tan(_x),(-_x^2+1)^(-1/2),cosh(_x),sinh(_x),  exp(_x),(_x)^(_y),log(_x),(_x)^(_y-1),cos(_x),sin(_x),tan(_x),
 tanh(_x),(_x^2+1)^(-1/2),(_x^2-1)^(-1/2)]  (-_x^2+1)^(-1/2),cosh(_x),sinh(_x),tanh(_x),
   (_x^2+1)^(-1/2),(_x^2-1)^(-1/2)]
 [1] ord([dx,dy,dz,a,b,c]);  [1] ord([dx,dy,dz,a,b,c]);
 [dx,dy,dz,a,b,c,x,y,z,u,v,w,p,q,r,s,t,d,e,f,g,h,i,j,k,l,m,n,o,_x,_y,_z,_u,_v,  [dx,dy,dz,a,b,c,x,y,z,u,v,w,p,q,r,s,t,d,e,f,g,h,i,j,k,l,m,n,o,_x,_y,
 _w,_p,_q,_r,_s,_t,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n,_o,exp(_x),  _z,_u,_v,_w,_p,_q,_r,_s,_t,_a,_b,_c,_d,_e,_f,_g,_h,_i,_j,_k,_l,_m,_n,
 (_x)^(_y),log(_x),(_x)^(_y-1),cos(_x),sin(_x),tan(_x),(-_x^2+1)^(-1/2),  _o,exp(_x),(_x)^(_y),log(_x),(_x)^(_y-1),cos(_x),sin(_x),tan(_x),
 cosh(_x),sinh(_x),tanh(_x),(_x^2+1)^(-1/2),(_x^2-1)^(-1/2)]  (-_x^2+1)^(-1/2),cosh(_x),sinh(_x),tanh(_x),
   (_x^2+1)^(-1/2),(_x^2-1)^(-1/2)]
 @end example  @end example
   
 \JP @node sdiv sdivm srem sremm sqr sqrm,,, $BB?9`<0$*$h$SM-M}<0$N1i;;(B  \JP @node sdiv sdivm srem sremm sqr sqrm,,, $BB?9`<0$*$h$SM-M}<0$N1i;;(B
Line 645  to the polynomials repeatedly yields the multiplicity.
Line 648  to the polynomials repeatedly yields the multiplicity.
   
 @example  @example
 [11] Y=(x+y+z)^5*(x-y-z)^3;  [11] Y=(x+y+z)^5*(x-y-z)^3;
 x^8+(2*y+2*z)*x^7+(-2*y^2-4*z*y-2*z^2)*x^6+(-6*y^3-18*z*y^2-18*z^2*y-6*z^3)*x^5  x^8+(2*y+2*z)*x^7+(-2*y^2-4*z*y-2*z^2)*x^6
 +(6*y^5+30*z*y^4+60*z^2*y^3+60*z^3*y^2+30*z^4*y+6*z^5)*x^3+(2*y^6+12*z*y^5  +(-6*y^3-18*z*y^2-18*z^2*y-6*z^3)*x^5
 +30*z^2*y^4+40*z^3*y^3+30*z^4*y^2+12*z^5*y+2*z^6)*x^2+(-2*y^7-14*z*y^6  +(6*y^5+30*z*y^4+60*z^2*y^3+60*z^3*y^2+30*z^4*y+6*z^5)*x^3
 -42*z^2*y^5-70*z^3*y^4-70*z^4*y^3-42*z^5*y^2-14*z^6*y-2*z^7)*x-y^8-8*z*y^7  +(2*y^6+12*z*y^5+30*z^2*y^4+40*z^3*y^3+30*z^4*y^2+12*z^5*y+2*z^6)*x^2
 -28*z^2*y^6-56*z^3*y^5-70*z^4*y^4-56*z^5*y^3-28*z^6*y^2-8*z^7*y-z^8  +(-2*y^7-14*z*y^6-42*z^2*y^5-70*z^3*y^4-70*z^4*y^3-42*z^5*y^2
   -14*z^6*y-2*z^7)*x-y^8-8*z*y^7-28*z^2*y^6-56*z^3*y^5-70*z^4*y^4
   -56*z^5*y^3-28*z^6*y^2-8*z^7*y-z^8
 [12] for(I=0,F=x+y+z,T=Y; T=tdiv(T,F); I++);  [12] for(I=0,F=x+y+z,T=Y; T=tdiv(T,F); I++);
 [13] I;  [13] I;
 5  5
Line 740  x^5+2*x^4+x^3+x^2+2*x+1
Line 745  x^5+2*x^4+x^3+x^2+2*x+1
 @item psubst(@var{rat}[,@var{var},@var{rat}]*)  @item psubst(@var{rat}[,@var{var},@var{rat}]*)
 \BJP  \BJP
 :: @var{rat} $B$N(B @var{varn} $B$K(B @var{ratn} $B$rBeF~(B  :: @var{rat} $B$N(B @var{varn} $B$K(B @var{ratn} $B$rBeF~(B
 (@var{n=1,2},... $B$G:8$+$i1&$K=g<!BeF~$9$k(B).  (@var{n}=1,2,... $B$G:8$+$i1&$K=g<!BeF~$9$k(B).
 \E  \E
 \BEG  \BEG
 :: Substitute @var{ratn} for @var{varn} in expression @var{rat}.  :: Substitute @var{ratn} for @var{varn} in expression @var{rat}.
 (@var{n=1,2},@dots{}.  (@var{n}=1,2,@dots{}.
 Substitution will be done successively from left to right  Substitution will be done successively from left to right
 if arguments are repeated.)  if arguments are repeated.)
 \E  \E
Line 754  if arguments are repeated.)
Line 759  if arguments are repeated.)
 @item return  @item return
 \JP $BM-M}<0(B  \JP $BM-M}<0(B
 \EG rational expression  \EG rational expression
 @item rat,ratn  @item rat ratn
 \JP $BM-M}<0(B  \JP $BM-M}<0(B
 \EG rational expression  \EG rational expression
 @item varn  @item varn
Line 783  if arguments are repeated.)
Line 788  if arguments are repeated.)
 $B$J$k$Y$/J,Jl(B, $BJ,;R$,Bg$-$/$J$i$J$$$h$&$KG[N8$9$k$3$H$b$7$P$7$PI,MW$H$J$k(B.  $B$J$k$Y$/J,Jl(B, $BJ,;R$,Bg$-$/$J$i$J$$$h$&$KG[N8$9$k$3$H$b$7$P$7$PI,MW$H$J$k(B.
 @item  @item
 $BJ,?t$rBeF~$9$k>l9g$bF1MM$G$"$k(B.  $BJ,?t$rBeF~$9$k>l9g$bF1MM$G$"$k(B.
   @item
   @code{subst}$B$N0z?t(B@var{rat}$B$,%j%9%H(B,$BG[Ns(B,$B9TNs(B,$B$"$k$$$OJ,;6I=8=B?9`<0$G(B
   $B$"$C$?>l9g$K$O(B, $B$=$l$>$l$NMWAG$^$?$O78?t$KBP$7$F:F5"E*$K(B@code{subst}$B$r(B
   $B9T$&(B.
 \E  \E
 \BEG  \BEG
 @item  @item
 Substitutes rational expressions for specified kernels in a rational  Substitutes rational expressions for specified kernels in a rational
 expression.  expression.
 @item  @item
 @t{subst}(@var{rat},@var{var1},@var{rat1},@var{var2},@var{rat2},@dots{})  @t{subst}(@var{r},@var{v1},@var{r1},@var{v2},@var{r2},@dots{})
 has the same effect as  has the same effect as
 @t{subst}(@t{subst}(@var{rat},@var{var1},@var{rat1}),@var{var2},@var{rat2},@dots{}).  @t{subst}(@t{subst}(@var{r},@var{v1},@var{r1}),@var{v2},@var{r2},@dots{}).
 @item  @item
 Note that repeated substitution is done from left to right successively.  Note that repeated substitution is done from left to right successively.
 You may get different result by changing the specification order.  You may get different result by changing the specification order.
Line 895  from left to right.
Line 904  from left to right.
 sin(x)  sin(x)
 @end example  @end example
   
   \JP @node ediff,,, $BB?9`<0$*$h$SM-M}<0$N1i;;(B
   \EG @node ediff,,, Polynomials and rational expressions
   @subsection @code{ediff}
   @findex ediff
   
   @table @t
   @item ediff(@var{poly}[,@var{varn}]*)
   @item ediff(@var{poly},@var{varlist})
   \JP :: @var{poly} $B$r(B @var{varn} $B$"$k$$$O(B @var{varlist} $B$NCf$NJQ?t$G=g<!%*%$%i!<HyJ,$9$k(B.
   \BEG
   :: Differentiate @var{poly} successively by Euler operators of @var{var}'s for the first
   form, or by Euler operators of variables in @var{varlist} for the second form.
   \E
   @end table
   
   @table @var
   @item return
   \JP $BB?9`<0(B
   \EG polynomial
   @item poly
   \JP $BB?9`<0(B
   \EG polynomial
   @item varn
   \JP $BITDj85(B
   \EG indeterminate
   @item varlist
   \JP $BITDj85$N%j%9%H(B
   \EG list of indeterminates
   @end table
   
   @itemize @bullet
   \BJP
   @item
   $B:8B&$NITDj85$h$j(B, $B=g$K%*%$%i!<HyJ,$7$F$$$/(B. $B$D$^$j(B, @t{ediff}(@var{poly},@t{x,y}) $B$O(B,
   @t{ediff}(@t{ediff}(@var{poly},@t{x}),@t{y}) $B$HF1$8$G$"$k(B.
   \E
   \BEG
   @item
   differentiation is performed by the specified indeterminates (variables)
   from left to right.
   @t{ediff}(@var{poly},@t{x,y}) is the same as
   @t{ediff}(@t{ediff}(@var{poly},@t{x}),@t{y}).
   \E
   @end itemize
   
   @example
   [0] ediff((x+2*y)^2,x);
   2*x^2+4*y*x
   [1] ediff((x+2*y)^2,x,y);
   4*y*x
   @end example
   
 \JP @node res,,, $BB?9`<0$*$h$SM-M}<0$N1i;;(B  \JP @node res,,, $BB?9`<0$*$h$SM-M}<0$N1i;;(B
 \EG @node res,,, Polynomials and rational expressions  \EG @node res,,, Polynomials and rational expressions
 @subsection @code{res}  @subsection @code{res}
Line 913  sin(x)
Line 974  sin(x)
 @item var  @item var
 \JP $BITDj85(B  \JP $BITDj85(B
 \EG indeterminate  \EG indeterminate
 @item poly1,poly2  @item poly1 poly2
 \JP $BB?9`<0(B  \JP $BB?9`<0(B
 \EG polynomial  \EG polynomial
 @item mod  @item mod
Line 1085  has a degree that is a multiple of @var{d}.
Line 1146  has a degree that is a multiple of @var{d}.
 t^9-15*t^6-87*t^3-125  t^9-15*t^6-87*t^3-125
 0msec  0msec
 [11] N=res(t,subst(A,t,x-2*t),A);  [11] N=res(t,subst(A,t,x-2*t),A);
 -x^81+1215*x^78-567405*x^75+139519665*x^72-19360343142*x^69+1720634125410*x^66  -x^81+1215*x^78-567405*x^75+139519665*x^72-19360343142*x^69
 -88249977024390*x^63-4856095669551930*x^60+1999385245240571421*x^57  +1720634125410*x^66-88249977024390*x^63-4856095669551930*x^60
 -15579689952590251515*x^54+15956967531741971462865*x^51  +1999385245240571421*x^57-15579689952590251515*x^54
   +15956967531741971462865*x^51
 ...  ...
 +140395588720353973535526123612661444550659875*x^6  +140395588720353973535526123612661444550659875*x^6
 +10122324287343155430042768923500799484375*x^3  +10122324287343155430042768923500799484375*x^3
Line 1105  t^9-15*t^6-87*t^3-125
Line 1167  t^9-15*t^6-87*t^3-125
 [[-1,1],[x^9-405*x^6-63423*x^3-2460375,1],  [[-1,1],[x^9-405*x^6-63423*x^3-2460375,1],
 [x^18-486*x^15+98739*x^12-9316620*x^9+945468531*x^6-12368049246*x^3  [x^18-486*x^15+98739*x^12-9316620*x^9+945468531*x^6-12368049246*x^3
 +296607516309,1],[x^18-8667*x^12+19842651*x^6+19683,1],  +296607516309,1],[x^18-8667*x^12+19842651*x^6+19683,1],
 [x^18-324*x^15+44469*x^12-1180980*x^9+427455711*x^6+2793253896*x^3+31524548679,1],  [x^18-324*x^15+44469*x^12-1180980*x^9+427455711*x^6+2793253896*x^3
   +31524548679,1],
 [x^18+10773*x^12+2784051*x^6+307546875,1]]  [x^18+10773*x^12+2784051*x^6+307546875,1]]
 167.050sec + gc : 1.890sec  167.050sec + gc : 1.890sec
 [14] ufctrhint(N,9);  [14] ufctrhint(N,9);
 [[-1,1],[x^9-405*x^6-63423*x^3-2460375,1],  [[-1,1],[x^9-405*x^6-63423*x^3-2460375,1],
 [x^18-486*x^15+98739*x^12-9316620*x^9+945468531*x^6-12368049246*x^3  [x^18-486*x^15+98739*x^12-9316620*x^9+945468531*x^6-12368049246*x^3
 +296607516309,1],[x^18-8667*x^12+19842651*x^6+19683,1],  +296607516309,1],[x^18-8667*x^12+19842651*x^6+19683,1],
 [x^18-324*x^15+44469*x^12-1180980*x^9+427455711*x^6+2793253896*x^3+31524548679,1],  [x^18-324*x^15+44469*x^12-1180980*x^9+427455711*x^6+2793253896*x^3
   +31524548679,1],
 [x^18+10773*x^12+2784051*x^6+307546875,1]]  [x^18+10773*x^12+2784051*x^6+307546875,1]]
 119.340sec + gc : 1.300sec  119.340sec + gc : 1.300sec
 @end example  @end example
Line 1130  t^9-15*t^6-87*t^3-125
Line 1194  t^9-15*t^6-87*t^3-125
   
 @table @t  @table @t
 @item modfctr(@var{poly},@var{mod})  @item modfctr(@var{poly},@var{mod})
 \JP :: $BM-8BBN>e$G$N(B 1 $BJQ?tB?9`<0$N0x?tJ,2r(B  \JP :: $BM-8BBN>e$G$NB?9`<0$N0x?tJ,2r(B
 \EG :: Univariate factorizer over small finite fields  \EG :: Factorizer over small finite fields
 @end table  @end table
   
 @table @var  @table @var
Line 1139  t^9-15*t^6-87*t^3-125
Line 1203  t^9-15*t^6-87*t^3-125
 \JP $B%j%9%H(B  \JP $B%j%9%H(B
 \EG list  \EG list
 @item poly  @item poly
 \JP $B@0?t78?t$N(B 1 $BJQ?tB?9`<0(B  \JP $B@0?t78?t$NB?9`<0(B
 \EG univariate polynomial with integer coefficients  \EG Polynomial with integer coefficients
 @item mod  @item mod
 \JP $B<+A3?t(B  \JP $B<+A3?t(B
 \EG non-negative integer  \EG non-negative integer
Line 1149  t^9-15*t^6-87*t^3-125
Line 1213  t^9-15*t^6-87*t^3-125
 @itemize @bullet  @itemize @bullet
 \BJP  \BJP
 @item  @item
 2^31 $BL$K~$N<+A3?t(B @var{mod} $B$rI8?t$H$9$kAGBN>e$G0lJQ?tB?9`<0(B  2^29 $BL$K~$N<+A3?t(B @var{mod} $B$rI8?t$H$9$kAGBN>e$GB?9`<0(B
 @var{poly} $B$r4{Ls0x;R$KJ,2r$9$k(B.  @var{poly} $B$r4{Ls0x;R$KJ,2r$9$k(B.
 @item  @item
 $B7k2L$O(B [[@b{$B?t78?t(B},1],[@b{$B0x;R(B},@b{$B=EJ#EY(B}],...] $B$J$k%j%9%H(B.  $B7k2L$O(B [[@b{$B?t78?t(B},1],[@b{$B0x;R(B},@b{$B=EJ#EY(B}],...] $B$J$k%j%9%H(B.
Line 1161  t^9-15*t^6-87*t^3-125
Line 1225  t^9-15*t^6-87*t^3-125
 \E  \E
 \BEG  \BEG
 @item  @item
 This function factorizes a univarate polynomial @var{poly} over  This function factorizes a polynomial @var{poly} over
 the finite prime field of characteristic @var{mod}, where  the finite prime field of characteristic @var{mod}, where
 @var{mod} must be smaller than 2^31.  @var{mod} must be smaller than 2^29.
 @item  @item
 The result is represented by a list, whose elements are a pair  The result is represented by a list, whose elements are a pair
 represented as  represented as
Line 1183  To factorize polynomials over large finite fields, use
Line 1247  To factorize polynomials over large finite fields, use
 [[1,1],[x+1513477736,1],[x+2055628767,1],[x+91854880,1],  [[1,1],[x+1513477736,1],[x+2055628767,1],[x+91854880,1],
 [x+634005911,1],[x+1513477735,1],[x+634005912,1],  [x+634005911,1],[x+1513477735,1],[x+634005912,1],
 [x^4+1759639395*x^2+2045307031,1]]  [x^4+1759639395*x^2+2045307031,1]]
   [1] modfctr(2*x^6+(y^2+z*y)*x^4+2*z*y^3*x^2+(2*z^2*y^2+z^3*y)*x+z^4,3);
   [[2,1],[2*x^3+z*y*x+z^2,1],[2*x^3+y^2*x+2*z^2,1]]
 @end example  @end example
   
 @table @t  @table @t
Line 1227  an integral polynomial such that GCD of all its coeffi
Line 1293  an integral polynomial such that GCD of all its coeffi
 $BJ,;RB?9`<0$N78?t$OM-M}?t$N$^$^$G$"$j(B, $BM-M}<0$NJ,;R$r5a$a$k(B  $BJ,;RB?9`<0$N78?t$OM-M}?t$N$^$^$G$"$j(B, $BM-M}<0$NJ,;R$r5a$a$k(B
 @code{nm()} $B$G$O(B, $BJ,?t78?tB?9`<0$O(B, $BJ,?t78?t$N$^$^$N7A$G=PNO$5$l$k$?$a(B,  @code{nm()} $B$G$O(B, $BJ,?t78?tB?9`<0$O(B, $BJ,?t78?t$N$^$^$N7A$G=PNO$5$l$k$?$a(B,
 $BD>$A$K@0?t78?tB?9`<0$rF@$k;v$O=PMh$J$$(B.  $BD>$A$K@0?t78?tB?9`<0$rF@$k;v$O=PMh$J$$(B.
   @item $B%*%W%7%g%s(B factor $B$,@_Dj$5$l$?>l9g$NLa$jCM$O%j%9%H(B [g,c] $B$G$"$k(B.
   $B$3$3$G(B c $B$OM-M}?t$G$"$j(B, g $B$,%*%W%7%g%s$N$J$$>l9g$NLa$jCM$G$"$j(B,
    @var{poly} = c*g $B$H$J$k(B.
 \E  \E
 \BEG  \BEG
 @item  @item
Line 1244  You cannot obtain an integral polynomial by direct use
Line 1313  You cannot obtain an integral polynomial by direct use
 @code{nm()}.  The function @code{nm()} returns the numerator of its  @code{nm()}.  The function @code{nm()} returns the numerator of its
 argument, and a polynomial with rational coefficients is  argument, and a polynomial with rational coefficients is
 the numerator of itself and will be returned as it is.  the numerator of itself and will be returned as it is.
   @item When the option factor is set, the return value is a list [g,c].
   Here, c is a rational number, g is an integral polynomial
   and @var{poly} = c*g holds.
 \E  \E
 @end itemize  @end itemize
   
Line 1329  y-z
Line 1401  y-z
 @item return  @item return
 \JP $BB?9`<0(B  \JP $BB?9`<0(B
 \EG polynomial  \EG polynomial
 @item poly1,poly2  @item poly1 poly2
 \JP $BB?9`<0(B  \JP $BB?9`<0(B
 \EG polynomial  \EG polynomial
 @item mod  @item mod

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.8

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>