Average Error: 5.3 → 0.1
Time: 8.9s
Precision: 64
\[x \cdot \left(1 + y \cdot y\right)\]
\[x \cdot 1 + \left(y \cdot x\right) \cdot y\]
x \cdot \left(1 + y \cdot y\right)
x \cdot 1 + \left(y \cdot x\right) \cdot y
double f(double x, double y) {
        double r460283 = x;
        double r460284 = 1.0;
        double r460285 = y;
        double r460286 = r460285 * r460285;
        double r460287 = r460284 + r460286;
        double r460288 = r460283 * r460287;
        return r460288;
}

double f(double x, double y) {
        double r460289 = x;
        double r460290 = 1.0;
        double r460291 = r460289 * r460290;
        double r460292 = y;
        double r460293 = r460292 * r460289;
        double r460294 = r460293 * r460292;
        double r460295 = r460291 + r460294;
        return r460295;
}

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

Derivation

  1. Initial program 5.3

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

    \[\leadsto \color{blue}{x \cdot 1 + x \cdot \left(y \cdot y\right)}\]
  4. Simplified5.3

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

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

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

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

Reproduce

herbie shell --seed 2020045 +o rules:numerics
(FPCore (x y)
  :name "Numeric.Integration.TanhSinh:everywhere from integration-0.2.1"
  :precision binary64

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

  (* x (+ 1 (* y y))))