Average Error: 0.0 → 0.0
Time: 5.4s
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 r21937484 = x;
        double r21937485 = 2.0;
        double r21937486 = r21937484 * r21937485;
        double r21937487 = r21937484 * r21937484;
        double r21937488 = r21937486 + r21937487;
        double r21937489 = y;
        double r21937490 = r21937489 * r21937489;
        double r21937491 = r21937488 + r21937490;
        return r21937491;
}

double f(double x, double y) {
        double r21937492 = y;
        double r21937493 = r21937492 * r21937492;
        double r21937494 = x;
        double r21937495 = r21937494 * r21937494;
        double r21937496 = 2.0;
        double r21937497 = r21937494 * r21937496;
        double r21937498 = r21937495 + r21937497;
        double r21937499 = r21937493 + r21937498;
        return r21937499;
}

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