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 r227504 = x;
        double r227505 = r227504 * r227504;
        double r227506 = y;
        double r227507 = r227506 * r227506;
        double r227508 = r227505 + r227507;
        return r227508;
}

double f(double x, double y) {
        double r227509 = x;
        double r227510 = r227509 * r227509;
        double r227511 = y;
        double r227512 = r227511 * r227511;
        double r227513 = r227510 + r227512;
        return r227513;
}

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