Average Error: 0.0 → 0.0
Time: 771.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 r57632 = x;
        double r57633 = r57632 * r57632;
        double r57634 = y;
        double r57635 = r57634 * r57634;
        double r57636 = r57633 + r57635;
        return r57636;
}

double f(double x, double y) {
        double r57637 = x;
        double r57638 = r57637 * r57637;
        double r57639 = y;
        double r57640 = r57639 * r57639;
        double r57641 = r57638 + r57640;
        return r57641;
}

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)))