Average Error: 0.0 → 0.0
Time: 1.2s
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 r153055 = x;
        double r153056 = r153055 * r153055;
        double r153057 = y;
        double r153058 = r153057 * r153057;
        double r153059 = r153056 + r153058;
        return r153059;
}

double f(double x, double y) {
        double r153060 = x;
        double r153061 = r153060 * r153060;
        double r153062 = y;
        double r153063 = r153062 * r153062;
        double r153064 = r153061 + r153063;
        return r153064;
}

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