Average Error: 0.0 → 0.0
Time: 10.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 r210281 = x;
        double r210282 = r210281 * r210281;
        double r210283 = y;
        double r210284 = r210283 * r210283;
        double r210285 = r210282 + r210284;
        return r210285;
}

double f(double x, double y) {
        double r210286 = x;
        double r210287 = r210286 * r210286;
        double r210288 = y;
        double r210289 = r210288 * r210288;
        double r210290 = r210287 + r210289;
        return r210290;
}

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