Average Error: 0.0 → 0.0
Time: 6.3s
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 r159059 = x;
        double r159060 = r159059 * r159059;
        double r159061 = y;
        double r159062 = r159061 * r159061;
        double r159063 = r159060 + r159062;
        return r159063;
}

double f(double x, double y) {
        double r159064 = x;
        double r159065 = r159064 * r159064;
        double r159066 = y;
        double r159067 = r159066 * r159066;
        double r159068 = r159065 + r159067;
        return r159068;
}

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