Average Error: 0.0 → 0.0
Time: 1.4s
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 r170134 = x;
        double r170135 = r170134 * r170134;
        double r170136 = y;
        double r170137 = r170136 * r170136;
        double r170138 = r170135 + r170137;
        return r170138;
}

double f(double x, double y) {
        double r170139 = x;
        double r170140 = r170139 * r170139;
        double r170141 = y;
        double r170142 = r170141 * r170141;
        double r170143 = r170140 + r170142;
        return r170143;
}

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