Average Error: 0.0 → 0.0
Time: 2.0s
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 r166496 = x;
        double r166497 = r166496 * r166496;
        double r166498 = y;
        double r166499 = r166498 * r166498;
        double r166500 = r166497 + r166499;
        return r166500;
}

double f(double x, double y) {
        double r166501 = x;
        double r166502 = r166501 * r166501;
        double r166503 = y;
        double r166504 = r166503 * r166503;
        double r166505 = r166502 + r166504;
        return r166505;
}

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