[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.2 and 1.6

version 1.2, 1999/12/21 02:47:34 version 1.6, 2003/11/27 15:56:08
Line 1 
Line 1 
 @comment $OpenXM$  @comment $OpenXM: OpenXM/src/asir-doc/parts/builtin/poly.texi,v 1.5 2003/04/20 08:01:29 noro 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 63 
Line 63 
 \E  \E
 \BEG  \BEG
 @item  @item
 @xref{Types in Asir} for main variable.  See @ref{Types in Asir} for main variable.
 @item  @item
 Indeterminates (variables) are ordered by default as follows.  Indeterminates (variables) are ordered by default as follows.
   
Line 171  Lists variables according to the variable ordering.
Line 171  Lists variables according to the variable ordering.
 @code{strtov()} $B$rMQ$$$k(B.  @code{strtov()} $B$rMQ$$$k(B.
 @item  @item
 @code{uc()} $B$G@8@.$5$l$?ITDj85$NITDj85$H$7$F$N7?(B (@code{vtype}) $B$O(B 1 $B$G$"$k(B.  @code{uc()} $B$G@8@.$5$l$?ITDj85$NITDj85$H$7$F$N7?(B (@code{vtype}) $B$O(B 1 $B$G$"$k(B.
 (@xref{$BITDj85$N7?(B})  (@xref{$BITDj85$N7?(B}.)
 \E  \E
 \BEG  \BEG
 @item  @item
Line 363  Variable @var{var} must be specified.
Line 363  Variable @var{var} must be specified.
 @item  @item
 $BM-M}<0$N>l9g$O(B, $BJ,;R$HJ,Jl$N9`?t$NOB$,JV$5$l$k(B.  $BM-M}<0$N>l9g$O(B, $BJ,;R$HJ,Jl$N9`?t$NOB$,JV$5$l$k(B.
 @item  @item
 $BH!?t7A<0(B (@xref{$BITDj85$N7?(B}) $B$O(B, $B0z?t$,2?$G$"$C$F$bC19`$H$_$J$5$l$k(B. (1 $B8D$NITDj85$HF1$8(B. )  $BH!?t7A<0(B (@ref{$BITDj85$N7?(B}) $B$O(B, $B0z?t$,2?$G$"$C$F$bC19`$H$_$J$5$l$k(B. (1 $B8D$NITDj85$HF1$8(B. )
 \E  \E
 \BEG  \BEG
 @item  @item
Line 451  objects which are created under different variable ord
Line 451  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 647  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 744  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 758  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 787  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 913  sin(x)
Line 921  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 1060  multiples of @var{hint}.
Line 1068  multiples of @var{hint}.
 $B3F4{Ls0x;R$N<!?t$,(B @var{hint} $B$NG\?t$G$"$k$3$H$,$o$+$C$F$$$k>l9g$K(B  $B3F4{Ls0x;R$N<!?t$,(B @var{hint} $B$NG\?t$G$"$k$3$H$,$o$+$C$F$$$k>l9g$K(B
 @var{poly} $B$N4{Ls0x;RJ,2r$r(B @code{fctr()} $B$h$j8zN(NI$/9T$&(B.  @var{poly} $B$N4{Ls0x;RJ,2r$r(B @code{fctr()} $B$h$j8zN(NI$/9T$&(B.
 @var{poly} $B$,(B, @var{d} $B<!$N3HBgBN>e$K$*$1$k(B  @var{poly} $B$,(B, @var{d} $B<!$N3HBgBN>e$K$*$1$k(B
 $B$"$kB?9`<0$N%N%k%`(B (@xref{$BBe?tE*?t$K4X$9$k1i;;(B}) $B$GL5J?J}$G$"$k>l9g(B,  $B$"$kB?9`<0$N%N%k%`(B (@ref{$BBe?tE*?t$K4X$9$k1i;;(B}) $B$GL5J?J}$G$"$k>l9g(B,
 $B3F4{Ls0x;R$N<!?t$O(B @var{d} $B$NG\?t$H$J$k(B. $B$3$N$h$&$J>l9g$K(B  $B3F4{Ls0x;R$N<!?t$O(B @var{d} $B$NG\?t$H$J$k(B. $B$3$N$h$&$J>l9g$K(B
 $BMQ$$$i$l$k(B.  $BMQ$$$i$l$k(B.
 \E  \E
Line 1073  more efficiently by the knowledge than @code{fctr()}.
Line 1081  more efficiently by the knowledge than @code{fctr()}.
 When @var{hint} is 1, @code{ufctrhint()} is the same as @code{fctr()} for  When @var{hint} is 1, @code{ufctrhint()} is the same as @code{fctr()} for
 uni-variate polynomials.  uni-variate polynomials.
 An typical application where @code{ufctrhint()} is effective:  An typical application where @code{ufctrhint()} is effective:
 Consider the case where @var{poly} is a norm (@xref{Algebraic numbers})  Consider the case where @var{poly} is a norm (@ref{Algebraic numbers})
 of a certain polynomial over an extension field with its extension  of a certain polynomial over an extension field with its extension
 degree @var{d}, and it is square free;  Then, every irreducible factor  degree @var{d}, and it is square free;  Then, every irreducible factor
 has a degree that is a multiple of @var{d}.  has a degree that is a multiple of @var{d}.
Line 1085  has a degree that is a multiple of @var{d}.
Line 1093  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 1114  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 1141  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 1150  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 1160  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 1172  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 1194  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 1329  y-z
Line 1342  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.2  
changed lines
  Added in v.1.6

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