Average Error: 0.0 → 0.0
Time: 2.8s
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 r256619 = x;
        double r256620 = r256619 * r256619;
        double r256621 = y;
        double r256622 = r256621 * r256621;
        double r256623 = r256620 + r256622;
        return r256623;
}

double f(double x, double y) {
        double r256624 = x;
        double r256625 = r256624 * r256624;
        double r256626 = y;
        double r256627 = r256626 * r256626;
        double r256628 = r256625 + r256627;
        return r256628;
}

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