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 r22925446 = x;
        double r22925447 = 2.0;
        double r22925448 = r22925446 * r22925447;
        double r22925449 = r22925446 * r22925446;
        double r22925450 = r22925448 + r22925449;
        double r22925451 = y;
        double r22925452 = r22925451 * r22925451;
        double r22925453 = r22925450 + r22925452;
        return r22925453;
}

double f(double x, double y) {
        double r22925454 = y;
        double r22925455 = r22925454 * r22925454;
        double r22925456 = x;
        double r22925457 = r22925456 * r22925456;
        double r22925458 = 2.0;
        double r22925459 = r22925456 * r22925458;
        double r22925460 = r22925457 + r22925459;
        double r22925461 = r22925455 + r22925460;
        return r22925461;
}

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