Airy zeta function

From formulasearchengine
Jump to navigation Jump to search

In modular arithmetic, Barrett reduction is a reduction algorithm introduced in 1986 by P.D. Barrett.[1] A naive way of computing

would be to use a fast division algorithm. Barrett reduction is an algorithm designed to optimize this operation assuming is constant, and , replacing divisions by multiplications.

Naive idea

Let be the inverse of as a floating point number. Then

where denotes the floor function,

assuming m was computed with sufficient accuracy.

Barrett algorithm

Barrett algorithm is a fixed-point analog which expresses everything in terms of integers. Let k be the smallest integer such that . Think of n as representing the fixed-point number . We precompute m such that . Then m represents the fixed-point number .

Let and .

Clearly , and if then . So

Barrett algorithm for polynomials

It is also possible to use Barrett algorithm for polynomial division, by reversing polynomials and using X-adic arithmetic.Template:Clarify

See also

Montgomery reduction is another similar algorithm.

References

43 year old Petroleum Engineer Harry from Deep River, usually spends time with hobbies and interests like renting movies, property developers in singapore new condominium and vehicle racing. Constantly enjoys going to destinations like Camino Real de Tierra Adentro.

Sources