Average Error: 4.9 → 4.9
Time: 11.6s
Precision: 64
\[x \cdot \left(1.0 + y \cdot y\right)\]
\[\left(1.0 + y \cdot y\right) \cdot x\]
x \cdot \left(1.0 + y \cdot y\right)
\left(1.0 + y \cdot y\right) \cdot x
double f(double x, double y) {
        double r23637709 = x;
        double r23637710 = 1.0;
        double r23637711 = y;
        double r23637712 = r23637711 * r23637711;
        double r23637713 = r23637710 + r23637712;
        double r23637714 = r23637709 * r23637713;
        return r23637714;
}

double f(double x, double y) {
        double r23637715 = 1.0;
        double r23637716 = y;
        double r23637717 = r23637716 * r23637716;
        double r23637718 = r23637715 + r23637717;
        double r23637719 = x;
        double r23637720 = r23637718 * r23637719;
        return r23637720;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original4.9
Target0.1
Herbie4.9
\[x + \left(x \cdot y\right) \cdot y\]

Derivation

  1. Initial program 4.9

    \[x \cdot \left(1.0 + y \cdot y\right)\]
  2. Final simplification4.9

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

Reproduce

herbie shell --seed 2019162 
(FPCore (x y)
  :name "Numeric.Integration.TanhSinh:everywhere from integration-0.2.1"

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

  (* x (+ 1.0 (* y y))))