Average Error: 0.0 → 0.0
Time: 1.6s
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 r170397 = x;
        double r170398 = r170397 * r170397;
        double r170399 = y;
        double r170400 = r170399 * r170399;
        double r170401 = r170398 + r170400;
        return r170401;
}

double f(double x, double y) {
        double r170402 = x;
        double r170403 = r170402 * r170402;
        double r170404 = y;
        double r170405 = r170404 * r170404;
        double r170406 = r170403 + r170405;
        return r170406;
}

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