Average Error: 0.0 → 0.0
Time: 3.5s
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 r224116 = x;
        double r224117 = r224116 * r224116;
        double r224118 = y;
        double r224119 = r224118 * r224118;
        double r224120 = r224117 + r224119;
        return r224120;
}

double f(double x, double y) {
        double r224121 = x;
        double r224122 = r224121 * r224121;
        double r224123 = y;
        double r224124 = r224123 * r224123;
        double r224125 = r224122 + r224124;
        return r224125;
}

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