Average Error: 0.0 → 0.0
Time: 606.0ms
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 r171907 = x;
        double r171908 = r171907 * r171907;
        double r171909 = y;
        double r171910 = r171909 * r171909;
        double r171911 = r171908 + r171910;
        return r171911;
}

double f(double x, double y) {
        double r171912 = x;
        double r171913 = r171912 * r171912;
        double r171914 = y;
        double r171915 = r171914 * r171914;
        double r171916 = r171913 + r171915;
        return r171916;
}

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