Average Error: 0.0 → 0.0
Time: 2.8s
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 r133119 = x;
        double r133120 = r133119 * r133119;
        double r133121 = y;
        double r133122 = r133121 * r133121;
        double r133123 = r133120 + r133122;
        return r133123;
}

double f(double x, double y) {
        double r133124 = x;
        double r133125 = r133124 * r133124;
        double r133126 = y;
        double r133127 = r133126 * r133126;
        double r133128 = r133125 + r133127;
        return r133128;
}

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