Average Error: 0.0 → 0.0
Time: 934.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 r214273 = x;
        double r214274 = r214273 * r214273;
        double r214275 = y;
        double r214276 = r214275 * r214275;
        double r214277 = r214274 + r214276;
        return r214277;
}

double f(double x, double y) {
        double r214278 = x;
        double r214279 = r214278 * r214278;
        double r214280 = y;
        double r214281 = r214280 * r214280;
        double r214282 = r214279 + r214281;
        return r214282;
}

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