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 r234655 = x;
        double r234656 = r234655 * r234655;
        double r234657 = y;
        double r234658 = r234657 * r234657;
        double r234659 = r234656 + r234658;
        return r234659;
}

double f(double x, double y) {
        double r234660 = x;
        double r234661 = r234660 * r234660;
        double r234662 = y;
        double r234663 = r234662 * r234662;
        double r234664 = r234661 + r234663;
        return r234664;
}

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