Average Error: 0.0 → 0.0
Time: 4.5s
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 r135734 = x;
        double r135735 = r135734 * r135734;
        double r135736 = y;
        double r135737 = r135736 * r135736;
        double r135738 = r135735 + r135737;
        return r135738;
}

double f(double x, double y) {
        double r135739 = x;
        double r135740 = r135739 * r135739;
        double r135741 = y;
        double r135742 = r135741 * r135741;
        double r135743 = r135740 + r135742;
        return r135743;
}

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