Gets this field element to the power of $(2^{252} - 3)$. This is a helper function for
calculating the square root.
<p>
TODO-CR BR: I think it makes sense to have a sqrt function.

@return This field element to the power of $(2^{252} - 3)$.
495666
public FieldElement pow22523() {
    FieldElement t0, t1, t2;

    // 2 == 2 * 1
    t0 = square();

    // 4 == 2 * 2
    t1 = t0.square();

    // 8 == 2 * 4
    t1 = t1.square();

    // z9 = z1*z8
    t1 = multiply(t1);

    // 11 == 9 + 2
    t0 = t0.multiply(t1);

    // 22 == 2 * 11
    t0 = t0.square();

    // 31 == 22 + 9
    t0 = t1.multiply(t0);

    // 2^6 - 2^1
    t1 = t0.square();

    // 2^10 - 2^5
    for (int i = 1; i < 5; ++i) {
      t1 = t1.square();
    }

    // 2^10 - 2^0
    t0 = t1.multiply(t0);

    // 2^11 - 2^1
    t1 = t0.square();

    // 2^20 - 2^10
    for (int i = 1; i < 10; ++i) {
      t1 = t1.square();
    }

    // 2^20 - 2^0
    t1 = t1.multiply(t0);

    // 2^21 - 2^1
    t2 = t1.square();

    // 2^40 - 2^20
    for (int i = 1; i < 20; ++i) {
      t2 = t2.square();
    }

    // 2^40 - 2^0
    t1 = t2.multiply(t1);

    // 2^41 - 2^1
    t1 = t1.square();

    // 2^50 - 2^10
    for (int i = 1; i < 10; ++i) {
      t1 = t1.square();
    }

    // 2^50 - 2^0
    t0 = t1.multiply(t0);

    // 2^51 - 2^1
    t1 = t0.square();

    // 2^100 - 2^50
    for (int i = 1; i < 50; ++i) {
      t1 = t1.square();
    }

    // 2^100 - 2^0
    t1 = t1.multiply(t0);

    // 2^101 - 2^1
    t2 = t1.square();

    // 2^200 - 2^100
    for (int i = 1; i < 100; ++i) {
      t2 = t2.square();
    }

    // 2^200 - 2^0
    t1 = t2.multiply(t1);

    // 2^201 - 2^1
    t1 = t1.square();

    // 2^250 - 2^50
    for (int i = 1; i < 50; ++i) {
      t1 = t1.square();
    }

    // 2^250 - 2^0
    t0 = t1.multiply(t0);

    // 2^251 - 2^1
    t0 = t0.square();

    // 2^252 - 2^2
    t0 = t0.square();

    // 2^252 - 3
    return multiply(t0);
  }
948070
def double
      return self if infinity?
      gamma = field.mod((3 * x * x + @group.param_a) * field.inverse(2 * y))
      new_x = field.mod(gamma * gamma - 2 * x)
      new_y = field.mod(gamma * (x - new_x) - y)
      self.class.new(group, new_x, new_y)
    end
795709
public static <A extends Number & Comparable<?>> NumberExpression<Double> power(Expression<A> num, int exponent) {
        return Expressions.numberOperation(Double.class, Ops.MathOps.POWER, num, ConstantImpl.create(exponent));
    }
731218
public static double computeL2(DoubleTuple t)
    {
        double sum = 0;
        for (int i=0; i<t.getSize(); i++)
        {
            double ti = t.get(i);
            sum += ti * ti;
        }
        return Math.sqrt(sum);
    }
293525
public final NumberExpression<Integer> size() {
        if (size == null) {
            size = Expressions.numberOperation(Integer.class, Ops.COL_SIZE, mixin);
        }
        return size;
    }
394529
public NumberExpression<Double> area() {
        if (area == null) {
            area = Expressions.numberOperation(Double.class, SpatialOps.AREA, mixin);
        }
        return area;
    }
1123501
public static long sqrt(long x) {
		long y = 0;
		long b = (~Long.MAX_VALUE) >>> 1;
		while (b > 0) {
			if (x >= y + b) {
				x -= y + b;
				y >>= 1;
				y += b;
			} else {
				y >>= 1;
			}
			b >>= 2;
		}
		return y;
	}
867401
public int rank () {
		double eps = Math.pow(2.0,-52.0);
		double tol = Math.max(m,n)*s[0]*eps;
		int r = 0;
		for (int i = 0; i < s.length; i++) {
			if (s[i] > tol) {
				r++;
			}
		}
		return r;
	}
1104384
public static DoubleBinding sqrt(final ObservableDoubleValue a) {
        return createDoubleBinding(() -> Math.sqrt(a.get()), a);
    }
758129
@Pure
	@Inline(value="$1.pow($2)")
	public static BigDecimal operator_power(BigDecimal a, int exponent) {
		return a.pow(exponent);
	}
1117784
public double num()
    throws javax.xml.transform.TransformerException
  {

    XMLString s = xstr();

    return s.toDouble();
  }
832787
public org.mariadb.jdbc.internal.com.send.authentication.ed25519.math.GroupElement toP3() {
    return toRep(Representation.P3);
  }
1313292
public function modulus()
    {
        if ($this->isReal()) {
            //sqrt(r^2 + 0^2) = sqrt(r^2) = abs(r)
            /** @noinspection PhpUndefinedMethodInspection */
            return $this->value['real']->abs();
        }
        //r^2 & i^2
        $sqrR = array(
            'n'=>pow($this->value['real']->numerator()->get(), 2),
            'd'=>pow($this->value['real']->denominator()->get(), 2)
        );
        $sqrI = array(
            'n'=>pow($this->value['imaginary']->numerator()->get(), 2),
            'd'=>pow($this->value['imaginary']->denominator()->get(), 2)
        );
        //r^2 + i^2
        $den = $this->lcm($sqrR['d'], $sqrI['d']);
        $num = ($sqrR['n'] * $den / $sqrR['d']) +
               ($sqrI['n'] * $den / $sqrI['d']);

        //sqrt(num/den) = sqrt(num)/sqrt(den)
        //now this a fudge - we ought to be able to get a proper square root using
        //factors etc but what we do instead is to do an approximation by converting
        //to intermediate rationals i.e.
        // rNum = RationaType(sqrt(num))
        // rDen = RationalType(sqrt(den))
        // mod = rN/1 * 1/rD
        $rNum = RationalTypeFactory::fromFloat(sqrt($num));
        $rDen = RationalTypeFactory::fromFloat(sqrt($den));
        $modN = $rNum->numerator()->get() * $rDen->denominator()->get();
        $modD = $rNum->denominator()->get() * $rDen->numerator()->get();

        return RationalTypeFactory::create($modN, $modD);
    }
958978
private String arith(){

        if(params.length != 3){
            throw new IllegalArgumentException("Wrong number of Parameters for arithmetic expression");
        }

        double res = 0;
        try{
            String operator = params[2];

            double firstValue = Double.parseDouble(record.getValueByFieldName(params[0]));

            double secondValue = Double.parseDouble(record.getValueByFieldName(params[1]));


            if("+".equals(operator)){
                res = firstValue + secondValue;
            }else if("-".equals(operator)){
                res = firstValue - secondValue;
            }else if("*".equals(operator)){
                res = firstValue * secondValue;
            }else if("/".equals(operator)){
                res = firstValue / secondValue;
            }else if("%".equals(operator)){
                res = (firstValue / secondValue) * 100;
            }

            NumberFormat decimalFormat = NumberFormat.getFormat(".##");
            res = Double.parseDouble(decimalFormat.format(res));
        }catch(Exception e){
            System.err.println("Error calculating table arithmetic function");
        }
        return Double.toString(res);

    }
216298
@Pure
	@Inline(value = "$3.pow($1.floatValue(), $2)", imported = Math.class)
	public static double operator_power(Float left, long right) {
		return Math.pow(left.floatValue(), right);
	}
868212
public Quaterniond scale(double factor, Quaterniond dest) {
        double sqrt = Math.sqrt(factor);
        dest.x = sqrt * x;
        dest.y = sqrt * y;
        dest.z = sqrt * z;
        dest.w = sqrt * w;
        return dest;
    }
660095
def _try_sqrt(self):
        ''' 
        '''
        if not self.field:
            assert self.b == 0
            root, remainder = fsqrt(self.a)
            if remainder == 1:
                return Constructible(root)
            else:
                return None

        if self._sign() < 0:
            raise ValueError('math domain error %s' % self)

        nn = self.a * self.a - self.b * self.b * self.r
        if nn._sign() < 0:
            return None

        n = nn._try_sqrt()
        if n is None:
            return None

        a = ((self.a + n) * Fraction(1, 2))._try_sqrt()
        if a is not None:
            result = Constructible(a, self.b / a * Fraction(1, 2), self.field)
            assert result.field == self.field
            return result

        b = ((self.a + n) / self.r * Fraction(1, 2))._try_sqrt()
        if b is not None:
            result = Constructible(self.b / b * Fraction(1, 2), b, self.field)
            assert result.field == self.field
            return result

        return None