Average Error: 0.0 → 0.0
Time: 517.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 r163828 = x;
        double r163829 = r163828 * r163828;
        double r163830 = y;
        double r163831 = r163830 * r163830;
        double r163832 = r163829 + r163831;
        return r163832;
}

double f(double x, double y) {
        double r163833 = x;
        double r163834 = r163833 * r163833;
        double r163835 = y;
        double r163836 = r163835 * r163835;
        double r163837 = r163834 + r163836;
        return r163837;
}

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