Average Error: 5.3 → 0.1
Time: 9.0s
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 r546827 = x;
        double r546828 = 1.0;
        double r546829 = y;
        double r546830 = r546829 * r546829;
        double r546831 = r546828 + r546830;
        double r546832 = r546827 * r546831;
        return r546832;
}

double f(double x, double y) {
        double r546833 = x;
        double r546834 = 1.0;
        double r546835 = r546833 * r546834;
        double r546836 = y;
        double r546837 = r546836 * r546833;
        double r546838 = r546837 * r546836;
        double r546839 = r546835 + r546838;
        return r546839;
}

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. Using strategy rm
  6. Applied pow15.3

    \[\leadsto x \cdot 1 + \left(y \cdot y\right) \cdot \color{blue}{{x}^{1}}\]
  7. Applied pow15.3

    \[\leadsto x \cdot 1 + \left(y \cdot \color{blue}{{y}^{1}}\right) \cdot {x}^{1}\]
  8. Applied pow15.3

    \[\leadsto x \cdot 1 + \left(\color{blue}{{y}^{1}} \cdot {y}^{1}\right) \cdot {x}^{1}\]
  9. Applied pow-prod-down5.3

    \[\leadsto x \cdot 1 + \color{blue}{{\left(y \cdot y\right)}^{1}} \cdot {x}^{1}\]
  10. Applied pow-prod-down5.3

    \[\leadsto x \cdot 1 + \color{blue}{{\left(\left(y \cdot y\right) \cdot x\right)}^{1}}\]
  11. Simplified0.1

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

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

Reproduce

herbie shell --seed 2020047 +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))))