Average Error: 0.0 → 0.0
Time: 1.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 r170379 = x;
        double r170380 = r170379 * r170379;
        double r170381 = y;
        double r170382 = r170381 * r170381;
        double r170383 = r170380 + r170382;
        return r170383;
}

double f(double x, double y) {
        double r170384 = x;
        double r170385 = r170384 * r170384;
        double r170386 = y;
        double r170387 = r170386 * r170386;
        double r170388 = r170385 + r170387;
        return r170388;
}

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