Average Error: 0.0 → 0.0
Time: 12.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 r166431 = x;
        double r166432 = r166431 * r166431;
        double r166433 = y;
        double r166434 = r166433 * r166433;
        double r166435 = r166432 + r166434;
        return r166435;
}

double f(double x, double y) {
        double r166436 = x;
        double r166437 = r166436 * r166436;
        double r166438 = y;
        double r166439 = r166438 * r166438;
        double r166440 = r166437 + r166439;
        return r166440;
}

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