Average Error: 5.6 → 5.6
Time: 2.0s
Precision: 64
\[x \cdot \left(1 + y \cdot y\right)\]
\[\left(x \cdot \sqrt{1 + y \cdot y}\right) \cdot \sqrt{1 + y \cdot y}\]
x \cdot \left(1 + y \cdot y\right)
\left(x \cdot \sqrt{1 + y \cdot y}\right) \cdot \sqrt{1 + y \cdot y}
double f(double x, double y) {
        double r624912 = x;
        double r624913 = 1.0;
        double r624914 = y;
        double r624915 = r624914 * r624914;
        double r624916 = r624913 + r624915;
        double r624917 = r624912 * r624916;
        return r624917;
}

double f(double x, double y) {
        double r624918 = x;
        double r624919 = 1.0;
        double r624920 = y;
        double r624921 = r624920 * r624920;
        double r624922 = r624919 + r624921;
        double r624923 = sqrt(r624922);
        double r624924 = r624918 * r624923;
        double r624925 = r624924 * r624923;
        return r624925;
}

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

Derivation

  1. Initial program 5.6

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

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

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

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

Reproduce

herbie shell --seed 2019362 
(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))))