GNU Info

Info Node: (gmp.info)Normal Powering Algorithm

(gmp.info)Normal Powering Algorithm


Next: Modular Powering Algorithm Prev: Powering Algorithms Up: Powering Algorithms
Enter node , (file) or (file)node

Normal Powering
---------------

   Normal `mpz' or `mpf' powering uses a simple binary algorithm,
successively squaring and then multiplying by the base when a 1 bit is
seen in the exponent, as per Knuth section 4.6.3.  The "left to right"
variant described there is used rather than algorithm A, since it's
just as easy and can be done with somewhat less temporary memory.


automatically generated by info2www version 1.2.2.9