Average Error: 0.0 → 0.0
Time: 5.0s
Precision: 64
\[\left(x \cdot 2.0 + x \cdot x\right) + y \cdot y\]
\[y \cdot y + \left(x \cdot x + x \cdot 2.0\right)\]
\left(x \cdot 2.0 + x \cdot x\right) + y \cdot y
y \cdot y + \left(x \cdot x + x \cdot 2.0\right)
double f(double x, double y) {
        double r23238768 = x;
        double r23238769 = 2.0;
        double r23238770 = r23238768 * r23238769;
        double r23238771 = r23238768 * r23238768;
        double r23238772 = r23238770 + r23238771;
        double r23238773 = y;
        double r23238774 = r23238773 * r23238773;
        double r23238775 = r23238772 + r23238774;
        return r23238775;
}

double f(double x, double y) {
        double r23238776 = y;
        double r23238777 = r23238776 * r23238776;
        double r23238778 = x;
        double r23238779 = r23238778 * r23238778;
        double r23238780 = 2.0;
        double r23238781 = r23238778 * r23238780;
        double r23238782 = r23238779 + r23238781;
        double r23238783 = r23238777 + r23238782;
        return r23238783;
}

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.0 \cdot x + x \cdot x\right)\]

Derivation

  1. Initial program 0.0

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

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

Reproduce

herbie shell --seed 2019163 
(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)))