Average Error: 0.0 → 0.0
Time: 8.6s
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 r18958666 = x;
        double r18958667 = 2.0;
        double r18958668 = r18958666 * r18958667;
        double r18958669 = r18958666 * r18958666;
        double r18958670 = r18958668 + r18958669;
        double r18958671 = y;
        double r18958672 = r18958671 * r18958671;
        double r18958673 = r18958670 + r18958672;
        return r18958673;
}

double f(double x, double y) {
        double r18958674 = y;
        double r18958675 = r18958674 * r18958674;
        double r18958676 = x;
        double r18958677 = r18958676 * r18958676;
        double r18958678 = 2.0;
        double r18958679 = r18958676 * r18958678;
        double r18958680 = r18958677 + r18958679;
        double r18958681 = r18958675 + r18958680;
        return r18958681;
}

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 2019162 
(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)))