Average Error: 0.0 → 0.0
Time: 1.6s
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 r103372 = x;
        double r103373 = r103372 * r103372;
        double r103374 = y;
        double r103375 = r103374 * r103374;
        double r103376 = r103373 + r103375;
        return r103376;
}

double f(double x, double y) {
        double r103377 = x;
        double r103378 = r103377 * r103377;
        double r103379 = y;
        double r103380 = r103379 * r103379;
        double r103381 = r103378 + r103380;
        return r103381;
}

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