Average Error: 0.0 → 0.0
Time: 1.4s
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 r187751 = x;
        double r187752 = r187751 * r187751;
        double r187753 = y;
        double r187754 = r187753 * r187753;
        double r187755 = r187752 + r187754;
        return r187755;
}

double f(double x, double y) {
        double r187756 = x;
        double r187757 = r187756 * r187756;
        double r187758 = y;
        double r187759 = r187758 * r187758;
        double r187760 = r187757 + r187759;
        return r187760;
}

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