Average Error: 0.0 → 0.0
Time: 15.0s
Precision: 64
\[\left(x \cdot 2 + x \cdot x\right) + y \cdot y\]
\[y \cdot y + \left(2 \cdot x + x \cdot x\right)\]
\left(x \cdot 2 + x \cdot x\right) + y \cdot y
y \cdot y + \left(2 \cdot x + x \cdot x\right)
double f(double x, double y) {
        double r18836671 = x;
        double r18836672 = 2.0;
        double r18836673 = r18836671 * r18836672;
        double r18836674 = r18836671 * r18836671;
        double r18836675 = r18836673 + r18836674;
        double r18836676 = y;
        double r18836677 = r18836676 * r18836676;
        double r18836678 = r18836675 + r18836677;
        return r18836678;
}

double f(double x, double y) {
        double r18836679 = y;
        double r18836680 = r18836679 * r18836679;
        double r18836681 = 2.0;
        double r18836682 = x;
        double r18836683 = r18836681 * r18836682;
        double r18836684 = r18836682 * r18836682;
        double r18836685 = r18836683 + r18836684;
        double r18836686 = r18836680 + r18836685;
        return r18836686;
}

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 y \cdot y + \left(2 \cdot x + x \cdot x\right)\]

Reproduce

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

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

  (+ (+ (* x 2.0) (* x x)) (* y y)))