Average Error: 0.0 → 0.0
Time: 540.0ms
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 r178335 = x;
        double r178336 = r178335 * r178335;
        double r178337 = y;
        double r178338 = r178337 * r178337;
        double r178339 = r178336 + r178338;
        return r178339;
}

double f(double x, double y) {
        double r178340 = x;
        double r178341 = r178340 * r178340;
        double r178342 = y;
        double r178343 = r178342 * r178342;
        double r178344 = r178341 + r178343;
        return r178344;
}

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