Average Error: 5.6 → 0.1
Time: 7.2s
Precision: 64
\[x \cdot \left(1 + y \cdot y\right)\]
\[y \cdot \left(y \cdot x\right) + 1 \cdot x\]
x \cdot \left(1 + y \cdot y\right)
y \cdot \left(y \cdot x\right) + 1 \cdot x
double f(double x, double y) {
        double r20409545 = x;
        double r20409546 = 1.0;
        double r20409547 = y;
        double r20409548 = r20409547 * r20409547;
        double r20409549 = r20409546 + r20409548;
        double r20409550 = r20409545 * r20409549;
        return r20409550;
}

double f(double x, double y) {
        double r20409551 = y;
        double r20409552 = x;
        double r20409553 = r20409551 * r20409552;
        double r20409554 = r20409551 * r20409553;
        double r20409555 = 1.0;
        double r20409556 = r20409555 * r20409552;
        double r20409557 = r20409554 + r20409556;
        return r20409557;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original5.6
Target0.1
Herbie0.1
\[x + \left(x \cdot y\right) \cdot y\]

Derivation

  1. Initial program 5.6

    \[x \cdot \left(1 + y \cdot y\right)\]
  2. Using strategy rm
  3. Applied distribute-rgt-in5.6

    \[\leadsto \color{blue}{1 \cdot x + \left(y \cdot y\right) \cdot x}\]
  4. Taylor expanded around 0 5.6

    \[\leadsto 1 \cdot x + \color{blue}{x \cdot {y}^{2}}\]
  5. Simplified0.1

    \[\leadsto 1 \cdot x + \color{blue}{\left(x \cdot y\right) \cdot y}\]
  6. Final simplification0.1

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

Reproduce

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

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

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