mirror of
https://github.com/logos-storage/plonky2.git
synced 2026-01-05 23:33:07 +00:00
Feedback
This commit is contained in:
parent
c56b7c8118
commit
bf4e7ff3b7
@ -192,9 +192,9 @@ pub trait Field:
|
|||||||
/// Compute the inverse of 2^exp in this field.
|
/// Compute the inverse of 2^exp in this field.
|
||||||
#[inline]
|
#[inline]
|
||||||
fn inverse_2exp(exp: usize) -> Self {
|
fn inverse_2exp(exp: usize) -> Self {
|
||||||
// Let p = char(F). Since 2^exp is a scalar, i.e. an element of GF_p,
|
// Let p = char(F). Since 2^exp is in the prime subfield, i.e. an
|
||||||
// its inverse must be as well. Thus we may add multiples of p without
|
// element of GF_p, its inverse must be as well. Thus we may add
|
||||||
// changing the result. In particular,
|
// multiples of p without changing the result. In particular,
|
||||||
// 2^-exp = 2^-exp - p 2^-exp
|
// 2^-exp = 2^-exp - p 2^-exp
|
||||||
// = 2^-exp (1 - p)
|
// = 2^-exp (1 - p)
|
||||||
// = p - (p - 1) / 2^exp
|
// = p - (p - 1) / 2^exp
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user