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

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

version 1.1.1.1, 1999/12/08 05:47:44 version 1.3, 2003/04/19 15:44:59
Line 1 
Line 1 
   @comment $OpenXM: OpenXM/src/asir-doc/parts/builtin/upoly.texi,v 1.2 1999/12/21 02:47:34 noro Exp $
   \BJP
 @node $B0lJQ?tB?9`<0$N1i;;(B,,, $BAH$_9~$_H!?t(B  @node $B0lJQ?tB?9`<0$N1i;;(B,,, $BAH$_9~$_H!?t(B
 @section $B0lJQ?tB?9`<0$N1i;;(B  @section $B0lJQ?tB?9`<0$N1i;;(B
   \E
   \BEG
   @node Univariate polynomials,,, Built-in Function
   @section Univariate polynomials
   \E
   
 @menu  @menu
 * umul umul_ff usquare usquare_ff utmul utmul_ff::  * umul umul_ff usquare usquare_ff utmul utmul_ff::
Line 10 
Line 17 
 * udiv urem urembymul urembymul_precomp ugcd::  * udiv urem urembymul urembymul_precomp ugcd::
 @end menu  @end menu
   
 @node umul umul_ff usquare usquare_ff utmul utmul_ff,,, $B0lJQ?tB?9`<0$N1i;;(B  \JP @node umul umul_ff usquare usquare_ff utmul utmul_ff,,, $B0lJQ?tB?9`<0$N1i;;(B
   \EG @node umul umul_ff usquare usquare_ff utmul utmul_ff,,, Univariate polynomials
 @subsection @code{umul}, @code{umul_ff}, @code{usquare}, @code{usquare_ff}, @code{utmul}, @code{utmul_ff}  @subsection @code{umul}, @code{umul_ff}, @code{usquare}, @code{usquare_ff}, @code{utmul}, @code{utmul_ff}
 @findex umul  @findex umul
 @findex umul_ff  @findex umul_ff
Line 22 
Line 30 
 @table @t  @table @t
 @item umul(@var{p1},@var{p2})  @item umul(@var{p1},@var{p2})
 @itemx umul_ff(@var{p1},@var{p2})  @itemx umul_ff(@var{p1},@var{p2})
 :: $B0lJQ?tB?9`<0$N9bB.>h;;(B  \JP :: $B0lJQ?tB?9`<0$N9bB.>h;;(B
   \EG :: Fast multiplication of univariate polynomials
 @item usquare(@var{p1})  @item usquare(@var{p1})
 @itemx usquare_ff(@var{p1})  @itemx usquare_ff(@var{p1})
 :: $B0lJQ?tB?9`<0$N9bB.(B 2 $B>h;;(B  \JP :: $B0lJQ?tB?9`<0$N9bB.(B 2 $B>h;;(B
   \EG :: Fast squaring of a univariate polynomial
 @item utmul(@var{p1},@var{p2},@var{d})  @item utmul(@var{p1},@var{p2},@var{d})
 @itemx utmul_ff(@var{p1},@var{p2},@var{d})  @itemx utmul_ff(@var{p1},@var{p2},@var{d})
 :: $B0lJQ?tB?9`<0$N9bB.>h;;(B ($BBG$A@Z$j<!?t;XDj(B)  \JP :: $B0lJQ?tB?9`<0$N9bB.>h;;(B ($BBG$A@Z$j<!?t;XDj(B)
   \EG :: Fast multiplication of univariate polynomials with truncation
 @end table  @end table
   
 @table @var  @table @var
 @item return  @item return
 $B0lJQ?tB?9`<0(B  \JP $B0lJQ?tB?9`<0(B
   \EG univariate polynomial
 @item p1 p2  @item p1 p2
 $B0lJQ?tB?9`<0(B  \JP $B0lJQ?tB?9`<0(B
   \EG univariate polynomial
 @item d  @item d
 $BHsIi@0?t(B  \JP $BHsIi@0?t(B
   \EG non-negative integer
 @end table  @end table
   
 @itemize @bullet  @itemize @bullet
   \BJP
 @item  @item
 $B0lJQ?tB?9`<0$N>h;;$r(B, $B<!?t$K1~$8$F7h$^$k%"%k%4%j%:%`$rMQ$$$F(B  $B0lJQ?tB?9`<0$N>h;;$r(B, $B<!?t$K1~$8$F7h$^$k%"%k%4%j%:%`$rMQ$$$F(B
 $B9bB.$K9T$&(B.  $B9bB.$K9T$&(B.
Line 51 
Line 66 
 @item  @item
 @code{umul_ff()}, @code{usquare_ff()}, @code{utmul_ff()} $B$O(B,  @code{umul_ff()}, @code{usquare_ff()}, @code{utmul_ff()} $B$O(B,
 $B78?t$rM-8BBN$N85$H8+$J$7$F(B, $BM-8BBN>e$NB?9`<0$H$7$F(B  $B78?t$rM-8BBN$N85$H8+$J$7$F(B, $BM-8BBN>e$NB?9`<0$H$7$F(B
 $B@Q$r5a$a$k(B. $B$?$@$7(B, $B0z?t$,A4$/M-8BBN$N85$r4^$^$J$$>l9g$K$O(B,  $B@Q$r5a$a$k(B. $B$?$@$7(B, $B0z?t$N78?t$,@0?t$N>l9g(B,
 $B@0?t78?t$NB?9`<0$rJV$9>l9g$b$"$k$N$G(B, $B$3$l$i$r8F$S=P$7$?7k2L(B  $B@0?t78?t$NB?9`<0$rJV$9>l9g$b$"$k$N$G(B, $B$3$l$i$r8F$S=P$7$?7k2L(B
 $B$,M-8BBN78?t$G$"$k$3$H$rJ]>Z$9$k$?$a$K$O(B  $B$,M-8BBN78?t$G$"$k$3$H$rJ]>Z$9$k$?$a$K$O(B
 $B$"$i$+$8$a(B @code{simp_ff()} $B$G78?t$rM-8BBN$N85$KJQ49$7$F$*$/$H$h$$(B.  $B$"$i$+$8$a(B @code{simp_ff()} $B$G78?t$rM-8BBN$N85$KJQ49$7$F$*$/$H$h$$(B.
Line 66  GF(2^n) $B78?t$NB?9`<0$r0z?t$K<h$l$J$$(B. 
Line 81  GF(2^n) $B78?t$NB?9`<0$r0z?t$K<h$l$J$$(B. 
 @item  @item
 $B$$$:$l$b(B, @code{set_upkara()} (@code{utmul}, @code{utmul_ff} $B$K$D$$$F$O(B  $B$$$:$l$b(B, @code{set_upkara()} (@code{utmul}, @code{utmul_ff} $B$K$D$$$F$O(B
 @code{set_uptkara()}) $B$GJV$5$l$kCM0J2<$N<!?t$KBP$7$F$ODL>o$NI.;;(B  @code{set_uptkara()}) $B$GJV$5$l$kCM0J2<$N<!?t$KBP$7$F$ODL>o$NI.;;(B
 $B7A<0$NJ}K!(B, @code{set_uufft()} $B$GJV$5$l$kCM0J2<$N<!?t$KBP$7$F$O(B Karatsuba  $B7A<0$NJ}K!(B, @code{set_upfft()} $B$GJV$5$l$kCM0J2<$N<!?t$KBP$7$F$O(B Karatsuba
 $BK!(B, $B$=$l0J>e$G$O(B FFT$B$*$h$SCf9q>jM>DjM}$,MQ$$$i$l$k(B. $B$9$J$o$A(B,  $BK!(B, $B$=$l0J>e$G$O(B FFT$B$*$h$SCf9q>jM>DjM}$,MQ$$$i$l$k(B. $B$9$J$o$A(B,
 $B@0?t$KBP$9$k(B FFT $B$G$O$J$/(B, $B==J,B?$/$N(B 1 $B%o!<%I0JFb$NK!(B @var{mi} $B$rMQ0U$7(B,  $B@0?t$KBP$9$k(B FFT $B$G$O$J$/(B, $B==J,B?$/$N(B 1 $B%o!<%I0JFb$NK!(B @var{mi} $B$rMQ0U$7(B,
 @var{p1}, @var{p2} $B$N78?t$r(B @var{mi} $B$G3d$C$?M>$j$H$7$?$b$N$N@Q$r(B,  @var{p1}, @var{p2} $B$N78?t$r(B @var{mi} $B$G3d$C$?M>$j$H$7$?$b$N$N@Q$r(B,
 FFT $B$G7W;;$7(B, $B:G8e$KCf9q>jM>DjM}$G9g@.$9$k(B. $B$=$N:](B, $BM-8BBNHG$N4X?t$K(B  FFT $B$G7W;;$7(B, $B:G8e$KCf9q>jM>DjM}$G9g@.$9$k(B. $B$=$N:](B, $BM-8BBNHG$N4X?t$K(B
 $B$*$$$F$O(B, $B:G8e$K4pACBN$rI=$9K!$G3F78?t$N>jM>$r7W;;$9$k$,(B, $B$3$3$G$O(B  $B$*$$$F$O(B, $B:G8e$K4pACBN$rI=$9K!$G3F78?t$N>jM>$r7W;;$9$k$,(B, $B$3$3$G$O(B
 Shoup $B$K$h$k%H%j%C%/$rMQ$$$F9bB.2=$7$F$"$k(B.  Shoup $B$K$h$k%H%j%C%/(B @code{[Shoup]} $B$rMQ$$$F9bB.2=$7$F$"$k(B.
   \E
   \BEG
   @item
   These functions compute products of univariate polynomials
   by selecting an appropriate algorithm depending on the degrees
   of inputs.
   @item
   @code{umul()}, @code{usquare()}, @code{utmul()}
   compute products over the integers.
   Coefficients in GF(p) are regarded as non-negative integers
   less than p.
   @item
   @code{umul_ff()}, @code{usquare_ff()}, @code{utmul_ff()}
   compute products over a finite field. However, if some of
   the coefficients of the inputs are integral,
   the result may be an integral polynomial. So if one wants
   to assure that the result is a polynomial over the finite field,
   apply @code{simp_ff()} to the inputs.
   @item
   @code{umul_ff()}, @code{usquare_ff()}, @code{utmul_ff()}
   cannot take polynomials over GF(2^n) as their inputs.
   @item
   @code{umul()}, @code{umul_ff()} produce @var{p1*p2}.
   @code{usquare()}, @code{usquare_ff()} produce @var{p1^2}.
   @code{utmul()}, @code{utmul_ff()} produce @var{p1*p2 mod} @var{v}^(@var{d}+1),
   where @var{v} is the variable of @var{p1}, @var{p2}.
   @item
   If the degrees of the inputs are less than or equal to the
   value returned by @code{set_upkara()} (@code{set_uptkara()} for
   @code{utmul}, @code{utmul_ff}), usual pencil and paper method is
   used. If the degrees of the inputs are less than or equall to
   the value returned by @code{set_upfft()}, Karatsuba algorithm
   is used. If the degrees of the inputs exceed it, a combination
   of FFT and Chinese remainder theorem is used.
   First of all sufficiently many primes @var{mi}
   within 1 machine word are prepared.
   Then @var{p1*p2 mod mi} is computed by FFT for each @var{mi}.
   Finally they are combined by Chinese remainder theorem.
   The functions over finite fields use an improvement by V. Shoup @code{[Shoup]}.
   \E
 @end itemize  @end itemize
   
 @example  @example
Line 101  Shoup $B$K$h$k%H%j%C%/$rMQ$$$F9bB.2=$7$F$"$k(B. 
Line 156  Shoup $B$K$h$k%H%j%C%/$rMQ$$$F9bB.2=$7$F$"$k(B. 
 @end example  @end example
   
 @table @t  @table @t
 @item $B;2>H(B  \JP @item $B;2>H(B
   \EG @item References
 @fref{set_upkara set_uptkara set_upfft},  @fref{set_upkara set_uptkara set_upfft},
 @fref{kmul ksquare ktmul}.  @fref{kmul ksquare ktmul}.
 @end table  @end table
   
 @node kmul ksquare ktmul,,, $B0lJQ?tB?9`<0$N1i;;(B  \JP @node kmul ksquare ktmul,,, $B0lJQ?tB?9`<0$N1i;;(B
   \EG @node kmul ksquare ktmul,,, Univariate polynomials
 @subsection @code{kmul}, @code{ksquare}, @code{ktmul}  @subsection @code{kmul}, @code{ksquare}, @code{ktmul}
 @findex kmul  @findex kmul
 @findex ksquare  @findex ksquare
Line 114  Shoup $B$K$h$k%H%j%C%/$rMQ$$$F9bB.2=$7$F$"$k(B. 
Line 171  Shoup $B$K$h$k%H%j%C%/$rMQ$$$F9bB.2=$7$F$"$k(B. 
   
 @table @t  @table @t
 @item kmul(@var{p1},@var{p2})  @item kmul(@var{p1},@var{p2})
 :: $B0lJQ?tB?9`<0$N9bB.>h;;(B  \JP :: $B0lJQ?tB?9`<0$N9bB.>h;;(B
   \EG :: Fast multiplication of univariate polynomials
 @item ksquare(@var{p1})  @item ksquare(@var{p1})
 :: $B0lJQ?tB?9`<0$N9bB.(B 2 $B>h;;(B  \JP :: $B0lJQ?tB?9`<0$N9bB.(B 2 $B>h;;(B
   \EG :: Fast squaring of a univariate polynomial
 @item ktmul(@var{p1},@var{p2},@var{d})  @item ktmul(@var{p1},@var{p2},@var{d})
 :: $B0lJQ?tB?9`<0$N9bB.>h;;(B ($BBG$A@Z$j<!?t;XDj(B)  \JP :: $B0lJQ?tB?9`<0$N9bB.>h;;(B ($BBG$A@Z$j<!?t;XDj(B)
   \EG :: Fast multiplication of univariate polynomials with truncation
 @end table  @end table
   
 @table @var  @table @var
 @item return  @item return
 $B0lJQ?tB?9`<0(B  \JP $B0lJQ?tB?9`<0(B
   \EG univariate polynomial
 @item p1 p2  @item p1 p2
 $B0lJQ?tB?9`<0(B  \JP $B0lJQ?tB?9`<0(B
   \EG univariate polynomial
 @item d  @item d
 $BHsIi@0?t(B  \JP $BHsIi@0?t(B
   \EG non-negative integer
 @end table  @end table
   
 @itemize @bullet  @itemize @bullet
   \BJP
 @item  @item
 $B0lJQ?tB?9`<0$N>h;;$r(B Karatsuba $BK!$G9T$&(B.  $B0lJQ?tB?9`<0$N>h;;$r(B Karatsuba $BK!$G9T$&(B.
 @item  @item
Line 138  Shoup $B$K$h$k%H%j%C%/$rMQ$$$F9bB.2=$7$F$"$k(B. 
Line 202  Shoup $B$K$h$k%H%j%C%/$rMQ$$$F9bB.2=$7$F$"$k(B. 
 FFT $B$rMQ$$$?9bB.2=$O9T$o$J$$(B.  FFT $B$rMQ$$$?9bB.2=$O9T$o$J$$(B.
 @item  @item
 GF(2^n) $B78?t$NB?9`<0$K$bMQ$$$k$3$H$,$G$-$k(B.  GF(2^n) $B78?t$NB?9`<0$K$bMQ$$$k$3$H$,$G$-$k(B.
   \E
   \BEG
   These functions compute products of univariate polynomials by Karatsuba
   algorithm.
   @item
   These functions do not apply FFT for large degree inputs.
   @item
   These functions can compute products over GF(2^n).
   \E
 @end itemize  @end itemize
   
 @example  @example
Line 153  return to toplevel
Line 226  return to toplevel
 [37] kmul(A,B)$  [37] kmul(A,B)$
 @end example  @end example
   
 @node set_upkara set_uptkara set_upfft,,, $B0lJQ?tB?9`<0$N1i;;(B  \JP @node set_upkara set_uptkara set_upfft,,, $B0lJQ?tB?9`<0$N1i;;(B
   \EG @node set_upkara set_uptkara set_upfft,,, Univariate polynomials
 @subsection @code{set_upkara}, @code{set_uptkara}, @code{set_upfft}  @subsection @code{set_upkara}, @code{set_uptkara}, @code{set_upfft}
 @findex set_upkara  @findex set_upkara
 @findex set_uptkara  @findex set_uptkara
Line 163  return to toplevel
Line 237  return to toplevel
 @item set_upkara([@var{threshold}])  @item set_upkara([@var{threshold}])
 @itemx set_uptkara([@var{threshold}])  @itemx set_uptkara([@var{threshold}])
 @itemx set_upfft([@var{threshold}])  @itemx set_upfft([@var{threshold}])
 :: 1 $BJQ?tB?9`<0$N@Q1i;;$K$*$1$k(B N^2 , Karatsuba, FFT $B%"%k%4%j%:%`$N@ZBX$($NogCM(B  \JP :: 1 $BJQ?tB?9`<0$N@Q1i;;$K$*$1$k(B N^2 , Karatsuba, FFT $B%"%k%4%j%:%`$N@ZBX$($NogCM(B
   \BEG
   :: Set thresholds in the selection of an algorithm from N^2, Karatsuba,
   FFT algorithms for univariate polynomial multiplication.
   \E
 @end table  @end table
   
 @table @var  @table @var
 @item return  @item return
 $B@_Dj$5$l$F$$$kCM(B  \JP $B@_Dj$5$l$F$$$kCM(B
   \EG value currently set
 @item threshold  @item threshold
 $BHsIi@0?t(B  \JP $BHsIi@0?t(B
   \EG non-negative integer
 @end table  @end table
   
 @itemize @bullet  @itemize @bullet
   \BJP
 @item  @item
 $B$$$:$l$b(B, $B0lJQ?tB?9`<0$N@Q$N7W;;$K$*$1$k(B, $B%"%k%4%j%:%`@ZBX$($NogCM$r(B  $B$$$:$l$b(B, $B0lJQ?tB?9`<0$N@Q$N7W;;$K$*$1$k(B, $B%"%k%4%j%:%`@ZBX$($NogCM$r(B
 $B@_Dj$9$k(B.  $B@_Dj$9$k(B.
Line 183  return to toplevel
Line 264  return to toplevel
 $B$5$l$k(B. $B$3$N@ZBX$($N<!?t$r@_Dj$9$k(B.  $B$5$l$k(B. $B$3$N@ZBX$($N<!?t$r@_Dj$9$k(B.
 @item  @item
 $B>\:Y$O(B, $B$=$l$>$l$N@Q4X?t$N9`$r;2>H$N$3$H(B.  $B>\:Y$O(B, $B$=$l$>$l$N@Q4X?t$N9`$r;2>H$N$3$H(B.
   \E
   \BEG
   @item
   These functions set thresholds in the selection of an algorithm from N^2,
   Karatsuba, FFT algorithms for univariate polynomial multiplication.
   @item
   Products of univariate polynomials are computed by N^2, Karatsuba,
   FFT algorithms. The algorithm selection is done according to the degrees of
   input polynomials and the thresholds.
   @item
   See the description of each function for details.
   \E
 @end itemize  @end itemize
   
 @table @t  @table @t
 @item $B;2>H(B  \JP @item $B;2>H(B
   \EG @item References
 @fref{kmul ksquare ktmul},  @fref{kmul ksquare ktmul},
 @fref{umul umul_ff usquare usquare_ff utmul utmul_ff}.  @fref{umul umul_ff usquare usquare_ff utmul utmul_ff}.
 @end table  @end table
   
 @node utrunc udecomp ureverse,,, $B0lJQ?tB?9`<0$N1i;;(B  \JP @node utrunc udecomp ureverse,,, $B0lJQ?tB?9`<0$N1i;;(B
   \EG @node utrunc udecomp ureverse,,, Univariate polynomials
 @subsection @code{utrunc}, @code{udecomp}, @code{ureverse}  @subsection @code{utrunc}, @code{udecomp}, @code{ureverse}
 @findex utrunc  @findex utrunc
 @findex udecomp  @findex udecomp
Line 201  return to toplevel
Line 296  return to toplevel
 @item utrunc(@var{p},@var{d})  @item utrunc(@var{p},@var{d})
 @itemx udecomp(@var{p},@var{d})  @itemx udecomp(@var{p},@var{d})
 @itemx ureverse(@var{p})  @itemx ureverse(@var{p})
 :: $BB?9`<0$KBP$9$kA`:n(B  \JP :: $BB?9`<0$KBP$9$kA`:n(B
   \EG :: Operations on polynomials
 @end table  @end table
   
 @table @var  @table @var
 @item return  @item return
 $B0lJQ?tB?9`<0$"$k$$$O0lJQ?tB?9`<0$N%j%9%H(B  \JP $B0lJQ?tB?9`<0$"$k$$$O0lJQ?tB?9`<0$N%j%9%H(B
   \EG univariate polynomial or list of univariate polynomials
 @item p  @item p
 $B0lJQ?tB?9`<0(B  \JP $B0lJQ?tB?9`<0(B
   \EG univariate polynomial
 @item d  @item d
 $BHsIi@0?t(B  \JP $BHsIi@0?t(B
   \EG non-negative integer
 @end table  @end table
   
 @itemize @bullet  @itemize @bullet
   \BJP
 @item  @item
 @var{p} $B$NJQ?t$r(B x $B$H$9$k(B. $B$3$N$H$-(B @var{p} = @var{p1}+x^(d+1)@var{p2}  @var{p} $B$NJQ?t$r(B x $B$H$9$k(B. $B$3$N$H$-(B @var{p} = @var{p1}+x^(@var{d}+1)@var{p2}
 (@var{p1} $B$N<!?t$O(B @var{d} $B0J2<(B) $B$HJ,2r$G$-$k(B. @code{utrunc()} $B$O(B  (@var{p1} $B$N<!?t$O(B @var{d} $B0J2<(B) $B$HJ,2r$G$-$k(B. @code{utrunc()} $B$O(B
 @var{p1} $B$rJV$7(B, @code{udecomp()} $B$O(B [@var{p1},@var{p2}] $B$rJV$9(B.  @var{p1} $B$rJV$7(B, @code{udecomp()} $B$O(B [@var{p1},@var{p2}] $B$rJV$9(B.
 @item  @item
 @var{p} $B$N<!?t$r(B @var{e} $B$H$7(B, @var{i} $B<!$N78?t$r(B @var{p[i]} $B$H$9$l$P(B,  @var{p} $B$N<!?t$r(B @var{e} $B$H$7(B, @var{i} $B<!$N78?t$r(B @var{p}[@var{i}] $B$H$9$l$P(B,
 @code{ureverse()} $B$O(B @var{p[e]}+@var{p[e-1]}x+... $B$rJV$9(B.  @code{ureverse()} $B$O(B @var{p}[@var{e}]+@var{p}[@var{e}-1]x+... $B$rJV$9(B.
   \E
   \BEG
   @item
   Let @var{x} be the variable of @var{p}. Then @var{p} can be decomposed
   as @var{p} = @var{p1}+x^(@var{d}+1)@var{p2}, where the degree of @var{p1}
   is less than or equal to @var{d}.
   Under the decomposition, @code{utrunc()} returns
   @var{p1} and  @code{udecomp()} returns [@var{p1},@var{p2}].
   @item
   Let @var{e} be the degree of @var{p} and @var{p}[@var{i}] the coefficient
   of @var{p} at degree @var{i}. Then
   @code{ureverse()} returns @var{p}[@var{e}]+@var{p}[@var{e}-1]x+....
   \E
 @end itemize  @end itemize
   
 @example  @example
Line 233  return to toplevel
Line 346  return to toplevel
 @end example  @end example
   
 @table @t  @table @t
 @item $B;2>H(B  \JP @item $B;2>H(B
   \EG @item References
 @fref{udiv urem urembymul urembymul_precomp ugcd}.  @fref{udiv urem urembymul urembymul_precomp ugcd}.
 @end table  @end table
   
 @node uinv_as_power_series ureverse_inv_as_power_series,,, $B0lJQ?tB?9`<0$N1i;;(B  \JP @node uinv_as_power_series ureverse_inv_as_power_series,,, $B0lJQ?tB?9`<0$N1i;;(B
   \EG @node uinv_as_power_series ureverse_inv_as_power_series,,, Univariate polynomials
 @subsection @code{uinv_as_power_series}, @code{ureverse_inv_as_power_series}  @subsection @code{uinv_as_power_series}, @code{ureverse_inv_as_power_series}
 @findex uinv_as_power_series  @findex uinv_as_power_series
 @findex ureverse_inv_as_power_series  @findex ureverse_inv_as_power_series
Line 245  return to toplevel
Line 360  return to toplevel
 @table @t  @table @t
 @item uinv_as_power_series(@var{p},@var{d})  @item uinv_as_power_series(@var{p},@var{d})
 @itemx ureverse_inv_as_power_series(@var{p},@var{d})  @itemx ureverse_inv_as_power_series(@var{p},@var{d})
 :: $BB?9`<0$rQQ5i?t$H$_$F(B, $B5U857W;;(B  \JP :: $BB?9`<0$rQQ5i?t$H$_$F(B, $B5U857W;;(B
   \EG :: Computes the truncated inverse as a power series.
 @end table  @end table
   
 @table @var  @table @var
 @item return  @item return
 $B0lJQ?tB?9`<0(B  \JP $B0lJQ?tB?9`<0(B
   \EG univariate polynomial
 @item p  @item p
 $B0lJQ?tB?9`<0(B  \JP $B0lJQ?tB?9`<0(B
   \EG univariate polynomial
 @item d  @item d
 $BHsIi@0?t(B  \JP $BHsIi@0?t(B
   \EG non-negative integer
 @end table  @end table
   
 @itemize @bullet  @itemize @bullet
   \BJP
 @item  @item
 @code{uinv_as_power_series(@var{p},@var{d})} $B$O(B, $BDj?t9`$,(B 0 $B$G$J$$(B  @code{uinv_as_power_series(@var{p},@var{d})} $B$O(B, $BDj?t9`$,(B 0 $B$G$J$$(B
 $BB?9`<0(B @var{p} $B$KBP$7(B, @var{p}@var{r}-1 $B$N:GDc<!?t$,(B @var{d}+1  $BB?9`<0(B @var{p} $B$KBP$7(B, @var{p}@var{r}-1 $B$N:GDc<!?t$,(B @var{d}+1
Line 268  return to toplevel
Line 388  return to toplevel
 $B$KBP$7$F(B @code{uinv_as_power_series(@var{p1},@var{d})} $B$r7W;;$9$k(B.  $B$KBP$7$F(B @code{uinv_as_power_series(@var{p1},@var{d})} $B$r7W;;$9$k(B.
 @item  @item
 @code{rembymul_precomp()} $B$N0z?t$H$7$FMQ$$$k>l9g(B, @code{ureverse_inv_as_power_series()} $B$N7k2L$r$=$N$^$^MQ$$$k$3$H$,$G$-$k(B.  @code{rembymul_precomp()} $B$N0z?t$H$7$FMQ$$$k>l9g(B, @code{ureverse_inv_as_power_series()} $B$N7k2L$r$=$N$^$^MQ$$$k$3$H$,$G$-$k(B.
   \E
   \BEG
   @item
   For a polynomial @var{p} with a non zero constant term,
   @code{uinv_as_power_series(@var{p},@var{d})} computes
   a polynomial @var{r} whose degree is at most @var{d}
   such that @var{p*r = 1 mod} x^(@var{d}+1), where @var{x} is the variable
   of @var{p}.
   @item
   Let @var{e} be the degree of @var{p}.
   @code{ureverse_inv_as_power_series(@var{p},@var{d})} computes
   @code{uinv_as_power_series(@var{p1},@var{d})} for
   @var{p1}=@code{ureverse(@var{p},@var{e})}.
   @item
   The output of @code{ureverse_inv_as_power_series()} can be used
   as the input of @code{rembymul_precomp()}.
   \E
 @end itemize  @end itemize
   
 @example  @example
Line 286  x^10+x^9
Line 423  x^10+x^9
 @end example  @end example
   
 @table @t  @table @t
 @item $B;2>H(B  \JP @item $B;2>H(B
   \EG @item References
 @fref{utrunc udecomp ureverse},  @fref{utrunc udecomp ureverse},
 @fref{udiv urem urembymul urembymul_precomp ugcd}.  @fref{udiv urem urembymul urembymul_precomp ugcd}.
 @end table  @end table
   
 @node udiv urem urembymul urembymul_precomp ugcd,,, $B0lJQ?tB?9`<0$N1i;;(B  \JP @node udiv urem urembymul urembymul_precomp ugcd,,, $B0lJQ?tB?9`<0$N1i;;(B
   \EG @node udiv urem urembymul urembymul_precomp ugcd,,, Univariate polynomials
 @subsection @code{udiv}, @code{urem}, @code{urembymul}, @code{urembymul_precomp}, @code{ugcd}  @subsection @code{udiv}, @code{urem}, @code{urembymul}, @code{urembymul_precomp}, @code{ugcd}
 @findex udiv  @findex udiv
 @findex urem  @findex urem
Line 305  x^10+x^9
Line 444  x^10+x^9
 @item urembymul(@var{p1},@var{p2})  @item urembymul(@var{p1},@var{p2})
 @item urembymul_precomp(@var{p1},@var{p2},@var{inv})  @item urembymul_precomp(@var{p1},@var{p2},@var{inv})
 @item ugcd(@var{p1},@var{p2})  @item ugcd(@var{p1},@var{p2})
 :: $BB?9`<0$KBP$9$kA`:n(B  \JP :: $B0lJQ?tB?9`<0$N=|;;(B, GCD
   \EG :: Division and GCD for univariate polynomials.
 @end table  @end table
   
 @table @var  @table @var
 @item return  @item return
 $B0lJQ?tB?9`<0(B  \JP $B0lJQ?tB?9`<0(B
 @item p1,p2,inv  \EG univariate polynomial
 $B0lJQ?tB?9`<0(B  @item p1 p2 inv
   \JP $B0lJQ?tB?9`<0(B
   \EG univariate polynomial
 @end table  @end table
   
 @itemize @bullet  @itemize @bullet
   \BJP
 @item  @item
 $B0lJQ?tB?9`<0(B @var{p1}, @var{p2} $B$KBP$7(B,  $B0lJQ?tB?9`<0(B @var{p1}, @var{p2} $B$KBP$7(B,
 @code{udiv} $B$O>&(B, @code{urem}, @code{urembymul} $B$O>jM>(B,  @code{udiv} $B$O>&(B, @code{urem}, @code{urembymul} $B$O>jM>(B,
Line 324  x^10+x^9
Line 467  x^10+x^9
 @code{urembymul} $B$O(B, @var{p2} $B$K$h$k>jM>7W;;$r(B, @var{p2} $B$N(B  @code{urembymul} $B$O(B, @var{p2} $B$K$h$k>jM>7W;;$r(B, @var{p2} $B$N(B
 $BQQ5i?t$H$7$F$N5U857W;;$*$h$S(B, $B>h;;(B 2 $B2s$KCV$-49$($?$b$N$G(B,  $BQQ5i?t$H$7$F$N5U857W;;$*$h$S(B, $B>h;;(B 2 $B2s$KCV$-49$($?$b$N$G(B,
 $B<!?t$,Bg$-$$>l9g$KM-8z$G$"$k(B.  $B<!?t$,Bg$-$$>l9g$KM-8z$G$"$k(B.
 @item @code{urembymul_precomp} $B$O(B, $B8GDj$5$l$?B?9`<0$K$h$k>jM>(B  @item
   @code{urembymul_precomp} $B$O(B, $B8GDj$5$l$?B?9`<0$K$h$k>jM>(B
 $B7W;;$rB??t9T$&>l9g$J$I$K8z2L$rH/4x$9$k(B.  $B7W;;$rB??t9T$&>l9g$J$I$K8z2L$rH/4x$9$k(B.
   $BBh(B 3 $B0z?t$O(B, $B$"$i$+$8$a(B @code{ureverse_inv_as_power_series()} $B$K(B
   $B$h$j7W;;$7$F$*$/(B.
   \E
   \BEG
   @item
   For univariate polynomials @var{p1} and @var{p2},
   there exist polynomials @var{q} and @var{r} such that
   @var{p1=q*p2+r} and the degree of @var{r} is less than that of @var{p2}.
   Then @code{udiv} returns @var{q}, @code{urem} and @code{urembymul} return
   @var{r}. @code{ugcd} returns the polynomial GCD of @var{p1} and @var{p2}.
   These functions are specially tuned up for dense univariate polynomials.
   In @code{urembymul} the division by @var{p2} is replaced with
   the inverse computation of @var{p2} as a power series and
   two polynomial multiplications. It speeds up the computation
   when the degrees of inputs are large.
   @item
   @code{urembymul_precomp} is efficient when one repeats divisions
   by a fixed polynomial.
   One has to compute the third argument by @code{ureverse_inv_as_power_series()}.
   \E
 @end itemize  @end itemize
   
 @example  @example
Line 348  x^10+x^9
Line 512  x^10+x^9
 @end example  @end example
   
 @table @t  @table @t
 @item $B;2>H(B  \JP @item $B;2>H(B
   \EG @item References
 @fref{uinv_as_power_series ureverse_inv_as_power_series}.  @fref{uinv_as_power_series ureverse_inv_as_power_series}.
 @end table  @end table

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

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