Average Error: 0.0 → 0.0
Time: 1.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 r182171 = x;
        double r182172 = r182171 * r182171;
        double r182173 = y;
        double r182174 = r182173 * r182173;
        double r182175 = r182172 + r182174;
        return r182175;
}

double f(double x, double y) {
        double r182176 = x;
        double r182177 = r182176 * r182176;
        double r182178 = y;
        double r182179 = r182178 * r182178;
        double r182180 = r182177 + r182179;
        return r182180;
}

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