Average Error: 0.0 → 0.0
Time: 560.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 r252465 = x;
        double r252466 = r252465 * r252465;
        double r252467 = y;
        double r252468 = r252467 * r252467;
        double r252469 = r252466 + r252468;
        return r252469;
}

double f(double x, double y) {
        double r252470 = x;
        double r252471 = r252470 * r252470;
        double r252472 = y;
        double r252473 = r252472 * r252472;
        double r252474 = r252471 + r252473;
        return r252474;
}

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)))