Average Error: 0.0 → 0.0
Time: 992.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 r186465 = x;
        double r186466 = r186465 * r186465;
        double r186467 = y;
        double r186468 = r186467 * r186467;
        double r186469 = r186466 + r186468;
        return r186469;
}

double f(double x, double y) {
        double r186470 = x;
        double r186471 = r186470 * r186470;
        double r186472 = y;
        double r186473 = r186472 * r186472;
        double r186474 = r186471 + r186473;
        return r186474;
}

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