pub fn invert(&self) -> CtOption<Self> {
        #[inline(always)]
        fn square_assign_multi(n: &mut Fr, num_times: usize) {
            for _ in 0..num_times {
                *n = n.square();
            }
        }
        // found using https://github.com/kwantam/addchain
        let mut t1 = self.square();
        let mut t0 = t1.square();
        let mut t3 = t0 * &t1;
        let t6 = t3 * self;
        let t7 = t6 * &t1;
        let t12 = t7 * &t3;
        let t13 = t12 * &t0;
        let t16 = t12 * &t3;
        let t2 = t13 * &t3;
        let t15 = t16 * &t3;
        let t19 = t2 * &t0;
        let t9 = t15 * &t3;
        let t18 = t9 * &t3;
        let t14 = t18 * &t1;
        let t4 = t18 * &t0;
        let t8 = t18 * &t3;
        let t17 = t14 * &t3;
        let t11 = t8 * &t3;
        t1 = t17 * &t3;
        let t5 = t11 * &t3;
        t3 = t5 * &t0;
        t0 = t5.square();
        square_assign_multi(&mut t0, 5);
        t0.mul_assign(&t3);
        square_assign_multi(&mut t0, 6);
        t0.mul_assign(&t8);
        square_assign_multi(&mut t0, 7);
        t0.mul_assign(&t19);
        square_assign_multi(&mut t0, 6);
        t0.mul_assign(&t13);
        square_assign_multi(&mut t0, 8);
        t0.mul_assign(&t14);
        square_assign_multi(&mut t0, 6);
        t0.mul_assign(&t18);
        square_assign_multi(&mut t0, 7);
        t0.mul_assign(&t17);
        square_assign_multi(&mut t0, 5);
        t0.mul_assign(&t16);
        square_assign_multi(&mut t0, 3);
        t0.mul_assign(self);
        square_assign_multi(&mut t0, 11);
        t0.mul_assign(&t11);
        square_assign_multi(&mut t0, 8);
        t0.mul_assign(&t5);
        square_assign_multi(&mut t0, 5);
        t0.mul_assign(&t15);
        square_assign_multi(&mut t0, 8);
        t0.mul_assign(self);
        square_assign_multi(&mut t0, 12);
        t0.mul_assign(&t13);
        square_assign_multi(&mut t0, 7);
        t0.mul_assign(&t9);
        square_assign_multi(&mut t0, 5);
        t0.mul_assign(&t15);
        square_assign_multi(&mut t0, 14);
        t0.mul_assign(&t14);
        square_assign_multi(&mut t0, 5);
        t0.mul_assign(&t13);
        square_assign_multi(&mut t0, 2);
        t0.mul_assign(self);
        square_assign_multi(&mut t0, 6);
        t0.mul_assign(self);
        square_assign_multi(&mut t0, 9);
        t0.mul_assign(&t7);
        square_assign_multi(&mut t0, 6);
        t0.mul_assign(&t12);
        square_assign_multi(&mut t0, 8);
        t0.mul_assign(&t11);
        square_assign_multi(&mut t0, 3);
        t0.mul_assign(self);
        square_assign_multi(&mut t0, 12);
        t0.mul_assign(&t9);
        square_assign_multi(&mut t0, 11);
        t0.mul_assign(&t8);
        square_assign_multi(&mut t0, 8);
        t0.mul_assign(&t7);
        square_assign_multi(&mut t0, 4);
        t0.mul_assign(&t6);
        square_assign_multi(&mut t0, 10);
        t0.mul_assign(&t5);
        square_assign_multi(&mut t0, 7);
        t0.mul_assign(&t3);
        square_assign_multi(&mut t0, 6);
        t0.mul_assign(&t4);
        square_assign_multi(&mut t0, 7);
        t0.mul_assign(&t3);
        square_assign_multi(&mut t0, 5);
        t0.mul_assign(&t2);
        square_assign_multi(&mut t0, 6);
        t0.mul_assign(&t2);
        square_assign_multi(&mut t0, 7);
        t0.mul_assign(&t1);

        CtOption::new(t0, !self.ct_eq(&Self::zero()))
    }
/// Computes the multiplicative inverse of this element,
/// failing if the element is zero.
Computes the multiplicative inverse of this element,
failing if the element is zero.
Computes the multiplicative inverse of this element failing if the element is zero .
pub fn invert(&self) -> CtOption<Self> {
        #[inline(always)]
        fn square_assign_multi(n: &mut Fr, num_times: usize) {
            for _ in 0..num_times {
                *n = n.square();
            }
        }
        // found using https://github.com/kwantam/addchain
        let mut t1 = self.square();
        let mut t0 = t1.square();
        let mut t3 = t0 * &t1;
        let t6 = t3 * self;
        let t7 = t6 * &t1;
        let t12 = t7 * &t3;
        let t13 = t12 * &t0;
        let t16 = t12 * &t3;
        let t2 = t13 * &t3;
        let t15 = t16 * &t3;
        let t19 = t2 * &t0;
        let t9 = t15 * &t3;
        let t18 = t9 * &t3;
        let t14 = t18 * &t1;
        let t4 = t18 * &t0;
        let t8 = t18 * &t3;
        let t17 = t14 * &t3;
        let t11 = t8 * &t3;
        t1 = t17 * &t3;
        let t5 = t11 * &t3;
        t3 = t5 * &t0;
        t0 = t5.square();
        square_assign_multi(&mut t0, 5);
        t0.mul_assign(&t3);
        square_assign_multi(&mut t0, 6);
        t0.mul_assign(&t8);
        square_assign_multi(&mut t0, 7);
        t0.mul_assign(&t19);
        square_assign_multi(&mut t0, 6);
        t0.mul_assign(&t13);
        square_assign_multi(&mut t0, 8);
        t0.mul_assign(&t14);
        square_assign_multi(&mut t0, 6);
        t0.mul_assign(&t18);
        square_assign_multi(&mut t0, 7);
        t0.mul_assign(&t17);
        square_assign_multi(&mut t0, 5);
        t0.mul_assign(&t16);
        square_assign_multi(&mut t0, 3);
        t0.mul_assign(self);
        square_assign_multi(&mut t0, 11);
        t0.mul_assign(&t11);
        square_assign_multi(&mut t0, 8);
        t0.mul_assign(&t5);
        square_assign_multi(&mut t0, 5);
        t0.mul_assign(&t15);
        square_assign_multi(&mut t0, 8);
        t0.mul_assign(self);
        square_assign_multi(&mut t0, 12);
        t0.mul_assign(&t13);
        square_assign_multi(&mut t0, 7);
        t0.mul_assign(&t9);
        square_assign_multi(&mut t0, 5);
        t0.mul_assign(&t15);
        square_assign_multi(&mut t0, 14);
        t0.mul_assign(&t14);
        square_assign_multi(&mut t0, 5);
        t0.mul_assign(&t13);
        square_assign_multi(&mut t0, 2);
        t0.mul_assign(self);
        square_assign_multi(&mut t0, 6);
        t0.mul_assign(self);
        square_assign_multi(&mut t0, 9);
        t0.mul_assign(&t7);
        square_assign_multi(&mut t0, 6);
        t0.mul_assign(&t12);
        square_assign_multi(&mut t0, 8);
        t0.mul_assign(&t11);
        square_assign_multi(&mut t0, 3);
        t0.mul_assign(self);
        square_assign_multi(&mut t0, 12);
        t0.mul_assign(&t9);
        square_assign_multi(&mut t0, 11);
        t0.mul_assign(&t8);
        square_assign_multi(&mut t0, 8);
        t0.mul_assign(&t7);
        square_assign_multi(&mut t0, 4);
        t0.mul_assign(&t6);
        square_assign_multi(&mut t0, 10);
        t0.mul_assign(&t5);
        square_assign_multi(&mut t0, 7);
        t0.mul_assign(&t3);
        square_assign_multi(&mut t0, 6);
        t0.mul_assign(&t4);
        square_assign_multi(&mut t0, 7);
        t0.mul_assign(&t3);
        square_assign_multi(&mut t0, 5);
        t0.mul_assign(&t2);
        square_assign_multi(&mut t0, 6);
        t0.mul_assign(&t2);
        square_assign_multi(&mut t0, 7);
        t0.mul_assign(&t1);
        CtOption::new(t0, !self.ct_eq(&Self::zero()))
    }
pub fn invert ( & self ) -> CtOption < Self > { # [ inline ( always ) ] fn square_assign_multi ( n : & mut Fr , num_times : usize ) { for _ in 0 .. num_times { * n = n . square ( ) ; } } // found using https://github.com/kwantam/addchain let mut t1 = self . square ( ) ; let mut t0 = t1 . square ( ) ; let mut t3 = t0 * & t1 ; let t6 = t3 * self ; let t7 = t6 * & t1 ; let t12 = t7 * & t3 ; let t13 = t12 * & t0 ; let t16 = t12 * & t3 ; let t2 = t13 * & t3 ; let t15 = t16 * & t3 ; let t19 = t2 * & t0 ; let t9 = t15 * & t3 ; let t18 = t9 * & t3 ; let t14 = t18 * & t1 ; let t4 = t18 * & t0 ; let t8 = t18 * & t3 ; let t17 = t14 * & t3 ; let t11 = t8 * & t3 ; t1 = t17 * & t3 ; let t5 = t11 * & t3 ; t3 = t5 * & t0 ; t0 = t5 . square ( ) ; square_assign_multi ( & mut t0 , 5 ) ; t0 . mul_assign ( & t3 ) ; square_assign_multi ( & mut t0 , 6 ) ; t0 . mul_assign ( & t8 ) ; square_assign_multi ( & mut t0 , 7 ) ; t0 . mul_assign ( & t19 ) ; square_assign_multi ( & mut t0 , 6 ) ; t0 . mul_assign ( & t13 ) ; square_assign_multi ( & mut t0 , 8 ) ; t0 . mul_assign ( & t14 ) ; square_assign_multi ( & mut t0 , 6 ) ; t0 . mul_assign ( & t18 ) ; square_assign_multi ( & mut t0 , 7 ) ; t0 . mul_assign ( & t17 ) ; square_assign_multi ( & mut t0 , 5 ) ; t0 . mul_assign ( & t16 ) ; square_assign_multi ( & mut t0 , 3 ) ; t0 . mul_assign ( self ) ; square_assign_multi ( & mut t0 , 11 ) ; t0 . mul_assign ( & t11 ) ; square_assign_multi ( & mut t0 , 8 ) ; t0 . mul_assign ( & t5 ) ; square_assign_multi ( & mut t0 , 5 ) ; t0 . mul_assign ( & t15 ) ; square_assign_multi ( & mut t0 , 8 ) ; t0 . mul_assign ( self ) ; square_assign_multi ( & mut t0 , 12 ) ; t0 . mul_assign ( & t13 ) ; square_assign_multi ( & mut t0 , 7 ) ; t0 . mul_assign ( & t9 ) ; square_assign_multi ( & mut t0 , 5 ) ; t0 . mul_assign ( & t15 ) ; square_assign_multi ( & mut t0 , 14 ) ; t0 . mul_assign ( & t14 ) ; square_assign_multi ( & mut t0 , 5 ) ; t0 . mul_assign ( & t13 ) ; square_assign_multi ( & mut t0 , 2 ) ; t0 . mul_assign ( self ) ; square_assign_multi ( & mut t0 , 6 ) ; t0 . mul_assign ( self ) ; square_assign_multi ( & mut t0 , 9 ) ; t0 . mul_assign ( & t7 ) ; square_assign_multi ( & mut t0 , 6 ) ; t0 . mul_assign ( & t12 ) ; square_assign_multi ( & mut t0 , 8 ) ; t0 . mul_assign ( & t11 ) ; square_assign_multi ( & mut t0 , 3 ) ; t0 . mul_assign ( self ) ; square_assign_multi ( & mut t0 , 12 ) ; t0 . mul_assign ( & t9 ) ; square_assign_multi ( & mut t0 , 11 ) ; t0 . mul_assign ( & t8 ) ; square_assign_multi ( & mut t0 , 8 ) ; t0 . mul_assign ( & t7 ) ; square_assign_multi ( & mut t0 , 4 ) ; t0 . mul_assign ( & t6 ) ; square_assign_multi ( & mut t0 , 10 ) ; t0 . mul_assign ( & t5 ) ; square_assign_multi ( & mut t0 , 7 ) ; t0 . mul_assign ( & t3 ) ; square_assign_multi ( & mut t0 , 6 ) ; t0 . mul_assign ( & t4 ) ; square_assign_multi ( & mut t0 , 7 ) ; t0 . mul_assign ( & t3 ) ; square_assign_multi ( & mut t0 , 5 ) ; t0 . mul_assign ( & t2 ) ; square_assign_multi ( & mut t0 , 6 ) ; t0 . mul_assign ( & t2 ) ; square_assign_multi ( & mut t0 , 7 ) ; t0 . mul_assign ( & t1 ) ; CtOption :: new ( t0 , ! self . ct_eq ( & Self :: zero ( ) ) ) }
Computes the multiplicative inverse of this element,
failing if the element is zero.
Computes the multiplicative inverse of this element failing if the element is zero .
&self