Average Error: 0.0 → 0.0
Time: 1.5s
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 r144026 = x;
        double r144027 = r144026 * r144026;
        double r144028 = y;
        double r144029 = r144028 * r144028;
        double r144030 = r144027 + r144029;
        return r144030;
}

double f(double x, double y) {
        double r144031 = x;
        double r144032 = r144031 * r144031;
        double r144033 = y;
        double r144034 = r144033 * r144033;
        double r144035 = r144032 + r144034;
        return r144035;
}

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 2020025 
(FPCore (x y)
  :name "Graphics.Rasterific.Linear:$cquadrance from Rasterific-0.6.1"
  :precision binary64
  (+ (* x x) (* y y)))