Average Error: 0.0 → 0.0
Time: 940.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 r190149 = x;
        double r190150 = r190149 * r190149;
        double r190151 = y;
        double r190152 = r190151 * r190151;
        double r190153 = r190150 + r190152;
        return r190153;
}

double f(double x, double y) {
        double r190154 = x;
        double r190155 = r190154 * r190154;
        double r190156 = y;
        double r190157 = r190156 * r190156;
        double r190158 = r190155 + r190157;
        return r190158;
}

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