Average Error: 0.0 → 0.0
Time: 790.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 r201362 = x;
        double r201363 = r201362 * r201362;
        double r201364 = y;
        double r201365 = r201364 * r201364;
        double r201366 = r201363 + r201365;
        return r201366;
}

double f(double x, double y) {
        double r201367 = x;
        double r201368 = r201367 * r201367;
        double r201369 = y;
        double r201370 = r201369 * r201369;
        double r201371 = r201368 + r201370;
        return r201371;
}

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