Average Error: 0.0 → 0.0
Time: 1.1s
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 r156771 = x;
        double r156772 = r156771 * r156771;
        double r156773 = y;
        double r156774 = r156773 * r156773;
        double r156775 = r156772 + r156774;
        return r156775;
}

double f(double x, double y) {
        double r156776 = x;
        double r156777 = r156776 * r156776;
        double r156778 = y;
        double r156779 = r156778 * r156778;
        double r156780 = r156777 + r156779;
        return r156780;
}

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