Average Error: 0.0 → 0.0
Time: 549.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 r45702 = x;
        double r45703 = r45702 * r45702;
        double r45704 = y;
        double r45705 = r45704 * r45704;
        double r45706 = r45703 + r45705;
        return r45706;
}

double f(double x, double y) {
        double r45707 = x;
        double r45708 = r45707 * r45707;
        double r45709 = y;
        double r45710 = r45709 * r45709;
        double r45711 = r45708 + r45710;
        return r45711;
}

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