Exponentiating by squaring
Posted on 2007-11-18 00:56 ZelluX 閱讀(402) 評(píng)論(0) 編輯 收藏 所屬分類: Mathematicshttp://www.wiki.cn/wiki/Exponentiation_by_squaring
Exponentiating by squaring is an algorithm used for the fast computation of large integer powers of a number. It is also known as the square-and-multiply algorithm or binary exponentiation. In additive groups the appropriate name is double-and-add algorithm. It implicitly uses the binary expansion of the exponent. It is of quite general use, for example in modular arithmetic.