Average Error: 5.4 → 5.4
Time: 8.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 r25268200 = x;
        double r25268201 = 1.0;
        double r25268202 = y;
        double r25268203 = r25268202 * r25268202;
        double r25268204 = r25268201 + r25268203;
        double r25268205 = r25268200 * r25268204;
        return r25268205;
}

double f(double x, double y) {
        double r25268206 = 1.0;
        double r25268207 = y;
        double r25268208 = r25268207 * r25268207;
        double r25268209 = r25268206 + r25268208;
        double r25268210 = sqrt(r25268209);
        double r25268211 = x;
        double r25268212 = r25268210 * r25268211;
        double r25268213 = r25268210 * r25268212;
        return r25268213;
}

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

Derivation

  1. Initial program 5.4

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

    \[\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.4

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

    \[\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))))