Average Error: 0.0 → 0.0
Time: 538.0ms
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 r139218 = x;
        double r139219 = r139218 * r139218;
        double r139220 = y;
        double r139221 = r139220 * r139220;
        double r139222 = r139219 + r139221;
        return r139222;
}

double f(double x, double y) {
        double r139223 = x;
        double r139224 = r139223 * r139223;
        double r139225 = y;
        double r139226 = r139225 * r139225;
        double r139227 = r139224 + r139226;
        return r139227;
}

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