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 r177266 = x;
        double r177267 = r177266 * r177266;
        double r177268 = y;
        double r177269 = r177268 * r177268;
        double r177270 = r177267 + r177269;
        return r177270;
}

double f(double x, double y) {
        double r177271 = x;
        double r177272 = r177271 * r177271;
        double r177273 = y;
        double r177274 = r177273 * r177273;
        double r177275 = r177272 + r177274;
        return r177275;
}

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