Average Error: 0.0 → 0.0
Time: 8.4s
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 r158301 = x;
        double r158302 = r158301 * r158301;
        double r158303 = y;
        double r158304 = r158303 * r158303;
        double r158305 = r158302 + r158304;
        return r158305;
}

double f(double x, double y) {
        double r158306 = x;
        double r158307 = r158306 * r158306;
        double r158308 = y;
        double r158309 = r158308 * r158308;
        double r158310 = r158307 + r158309;
        return r158310;
}

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