Average Error: 5.3 → 5.3
Time: 9.0s
Precision: 64
\[x \cdot \left(1 + y \cdot y\right)\]
\[\sqrt{1 + y \cdot y} \cdot \left(\sqrt{1 + y \cdot y} \cdot x\right)\]
x \cdot \left(1 + y \cdot y\right)
\sqrt{1 + y \cdot y} \cdot \left(\sqrt{1 + y \cdot y} \cdot x\right)
double f(double x, double y) {
        double r10607980 = x;
        double r10607981 = 1.0;
        double r10607982 = y;
        double r10607983 = r10607982 * r10607982;
        double r10607984 = r10607981 + r10607983;
        double r10607985 = r10607980 * r10607984;
        return r10607985;
}

double f(double x, double y) {
        double r10607986 = 1.0;
        double r10607987 = y;
        double r10607988 = r10607987 * r10607987;
        double r10607989 = r10607986 + r10607988;
        double r10607990 = sqrt(r10607989);
        double r10607991 = x;
        double r10607992 = r10607990 * r10607991;
        double r10607993 = r10607990 * r10607992;
        return r10607993;
}

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
Herbie5.3
\[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 add-sqr-sqrt5.3

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

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

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

Reproduce

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

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

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