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 r160674 = x;
        double r160675 = r160674 * r160674;
        double r160676 = y;
        double r160677 = r160676 * r160676;
        double r160678 = r160675 + r160677;
        return r160678;
}

double f(double x, double y) {
        double r160679 = x;
        double r160680 = r160679 * r160679;
        double r160681 = y;
        double r160682 = r160681 * r160681;
        double r160683 = r160680 + r160682;
        return r160683;
}

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