Average Error: 0.0 → 0.0
Time: 1.1s
Precision: 64
\[x \cdot x + y \cdot y\]
\[x \cdot x + y \cdot y\]
x \cdot x + y \cdot y
x \cdot x + y \cdot y
double f(double x, double y) {
        double r146758 = x;
        double r146759 = r146758 * r146758;
        double r146760 = y;
        double r146761 = r146760 * r146760;
        double r146762 = r146759 + r146761;
        return r146762;
}

double f(double x, double y) {
        double r146763 = x;
        double r146764 = r146763 * r146763;
        double r146765 = y;
        double r146766 = r146765 * r146765;
        double r146767 = r146764 + r146766;
        return r146767;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[x \cdot x + y \cdot y\]
  2. Final simplification0.0

    \[\leadsto x \cdot x + y \cdot y\]

Reproduce

herbie shell --seed 2019352 +o rules:numerics
(FPCore (x y)
  :name "Graphics.Rasterific.Linear:$cquadrance from Rasterific-0.6.1"
  :precision binary64
  (+ (* x x) (* y y)))