Average Error: 5.5 → 0.1
Time: 17.7s
Precision: 64
\[x \cdot \left(1 + y \cdot y\right)\]
\[1 \cdot x + y \cdot \left(y \cdot x\right)\]
x \cdot \left(1 + y \cdot y\right)
1 \cdot x + y \cdot \left(y \cdot x\right)
double f(double x, double y) {
        double r160705796 = x;
        double r160705797 = 1.0;
        double r160705798 = y;
        double r160705799 = r160705798 * r160705798;
        double r160705800 = r160705797 + r160705799;
        double r160705801 = r160705796 * r160705800;
        return r160705801;
}

double f(double x, double y) {
        double r160705802 = 1.0;
        double r160705803 = x;
        double r160705804 = r160705802 * r160705803;
        double r160705805 = y;
        double r160705806 = r160705805 * r160705803;
        double r160705807 = r160705805 * r160705806;
        double r160705808 = r160705804 + r160705807;
        return r160705808;
}

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.5
Target0.1
Herbie0.1
\[x + \left(x \cdot y\right) \cdot y\]

Derivation

  1. Initial program 5.5

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

    \[\leadsto \color{blue}{1 \cdot x + \left(y \cdot y\right) \cdot x}\]
  4. Using strategy rm
  5. Applied associate-*l*0.1

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

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

Reproduce

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

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

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