From 4270d4ff5f3b1f405aad955cb48f1fcda660cd9d Mon Sep 17 00:00:00 2001 From: Isis Lovecruft Date: Tue, 22 Jan 2019 01:01:08 +0000 Subject: [PATCH] Fix two typos in FieldElement::invsqrt documentation. --- src/field.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/field.rs b/src/field.rs index 2ad5d7f..f3c3320 100644 --- a/src/field.rs +++ b/src/field.rs @@ -255,7 +255,7 @@ impl FieldElement { (was_nonzero_square, r) } - /// Attempt to compute `1/sqrt(self)` in constant time. + /// Attempt to compute `sqrt(1/self)` in constant time. /// /// Convenience wrapper around `sqrt_ratio_i`. /// @@ -265,7 +265,7 @@ impl FieldElement { /// /// - `(Choice(1), +sqrt(1/self)) ` if `self` is a nonzero square; /// - `(Choice(0), zero) ` if `self` is zero; - /// - `(Choice(0), +sqrt(i*u/v)) ` if `self` is a nonzero nonsquare; + /// - `(Choice(0), +sqrt(i/self)) ` if `self` is a nonzero nonsquare; /// pub fn invsqrt(&self) -> (Choice, FieldElement) { FieldElement::sqrt_ratio_i(&FieldElement::one(), self)