Average Error: 0.0 → 0.0
Time: 2.3s
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 r112361 = x;
        double r112362 = r112361 * r112361;
        double r112363 = y;
        double r112364 = r112363 * r112363;
        double r112365 = r112362 + r112364;
        return r112365;
}

double f(double x, double y) {
        double r112366 = x;
        double r112367 = r112366 * r112366;
        double r112368 = y;
        double r112369 = r112368 * r112368;
        double r112370 = r112367 + r112369;
        return r112370;
}

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