Average Error: 5.8 → 5.8
Time: 34.8s
Precision: 64
\[x \cdot \left(1.0 + y \cdot y\right)\]
\[\sqrt{1.0 + y \cdot y} \cdot \left(\sqrt{1.0 + y \cdot y} \cdot x\right)\]
x \cdot \left(1.0 + y \cdot y\right)
\sqrt{1.0 + y \cdot y} \cdot \left(\sqrt{1.0 + y \cdot y} \cdot x\right)
double f(double x, double y) {
        double r26001131 = x;
        double r26001132 = 1.0;
        double r26001133 = y;
        double r26001134 = r26001133 * r26001133;
        double r26001135 = r26001132 + r26001134;
        double r26001136 = r26001131 * r26001135;
        return r26001136;
}

double f(double x, double y) {
        double r26001137 = 1.0;
        double r26001138 = y;
        double r26001139 = r26001138 * r26001138;
        double r26001140 = r26001137 + r26001139;
        double r26001141 = sqrt(r26001140);
        double r26001142 = x;
        double r26001143 = r26001141 * r26001142;
        double r26001144 = r26001141 * r26001143;
        return r26001144;
}

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

Derivation

  1. Initial program 5.8

    \[x \cdot \left(1.0 + y \cdot y\right)\]
  2. Using strategy rm
  3. Applied add-sqr-sqrt5.8

    \[\leadsto x \cdot \color{blue}{\left(\sqrt{1.0 + y \cdot y} \cdot \sqrt{1.0 + y \cdot y}\right)}\]
  4. Applied associate-*r*5.8

    \[\leadsto \color{blue}{\left(x \cdot \sqrt{1.0 + y \cdot y}\right) \cdot \sqrt{1.0 + y \cdot y}}\]
  5. Final simplification5.8

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

Reproduce

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

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

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