Average Error: 0.0 → 0.0
Time: 6.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 r98153 = x;
        double r98154 = r98153 * r98153;
        double r98155 = y;
        double r98156 = r98155 * r98155;
        double r98157 = r98154 + r98156;
        return r98157;
}

double f(double x, double y) {
        double r98158 = x;
        double r98159 = r98158 * r98158;
        double r98160 = y;
        double r98161 = r98160 * r98160;
        double r98162 = r98159 + r98161;
        return r98162;
}

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