Average Error: 0.0 → 0.0
Time: 2.2s
Precision: 64
\[\left(x \cdot 2 + x \cdot x\right) + y \cdot y\]
\[\left(x \cdot 2 + x \cdot x\right) + y \cdot y\]
\left(x \cdot 2 + x \cdot x\right) + y \cdot y
\left(x \cdot 2 + x \cdot x\right) + y \cdot y
double f(double x, double y) {
        double r431158 = x;
        double r431159 = 2.0;
        double r431160 = r431158 * r431159;
        double r431161 = r431158 * r431158;
        double r431162 = r431160 + r431161;
        double r431163 = y;
        double r431164 = r431163 * r431163;
        double r431165 = r431162 + r431164;
        return r431165;
}

double f(double x, double y) {
        double r431166 = x;
        double r431167 = 2.0;
        double r431168 = r431166 * r431167;
        double r431169 = r431166 * r431166;
        double r431170 = r431168 + r431169;
        double r431171 = y;
        double r431172 = r431171 * r431171;
        double r431173 = r431170 + r431172;
        return r431173;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0.0
Target0.0
Herbie0.0
\[y \cdot y + \left(2 \cdot x + x \cdot x\right)\]

Derivation

  1. Initial program 0.0

    \[\left(x \cdot 2 + x \cdot x\right) + y \cdot y\]
  2. Final simplification0.0

    \[\leadsto \left(x \cdot 2 + x \cdot x\right) + y \cdot y\]

Reproduce

herbie shell --seed 2020057 +o rules:numerics
(FPCore (x y)
  :name "Numeric.Log:$clog1p from log-domain-0.10.2.1, A"
  :precision binary64

  :herbie-target
  (+ (* y y) (+ (* 2 x) (* x x)))

  (+ (+ (* x 2) (* x x)) (* y y)))