Average Error: 0.0 → 0.0
Time: 6.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 r116090 = x;
        double r116091 = r116090 * r116090;
        double r116092 = y;
        double r116093 = r116092 * r116092;
        double r116094 = r116091 + r116093;
        return r116094;
}

double f(double x, double y) {
        double r116095 = x;
        double r116096 = r116095 * r116095;
        double r116097 = y;
        double r116098 = r116097 * r116097;
        double r116099 = r116096 + r116098;
        return r116099;
}

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