Average Error: 0.0 → 0.0
Time: 571.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 r23686 = x;
        double r23687 = r23686 * r23686;
        double r23688 = y;
        double r23689 = r23688 * r23688;
        double r23690 = r23687 + r23689;
        return r23690;
}

double f(double x, double y) {
        double r23691 = x;
        double r23692 = r23691 * r23691;
        double r23693 = y;
        double r23694 = r23693 * r23693;
        double r23695 = r23692 + r23694;
        return r23695;
}

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