Average Error: 0.0 → 0.0
Time: 1.0s
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 r147006 = x;
        double r147007 = r147006 * r147006;
        double r147008 = y;
        double r147009 = r147008 * r147008;
        double r147010 = r147007 + r147009;
        return r147010;
}

double f(double x, double y) {
        double r147011 = x;
        double r147012 = r147011 * r147011;
        double r147013 = y;
        double r147014 = r147013 * r147013;
        double r147015 = r147012 + r147014;
        return r147015;
}

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