Average Error: 5.4 → 0.1
Time: 13.8s
Precision: 64
\[x \cdot \left(1.0 + y \cdot y\right)\]
\[y \cdot \left(y \cdot x\right) + 1.0 \cdot x\]
x \cdot \left(1.0 + y \cdot y\right)
y \cdot \left(y \cdot x\right) + 1.0 \cdot x
double f(double x, double y) {
        double r19269827 = x;
        double r19269828 = 1.0;
        double r19269829 = y;
        double r19269830 = r19269829 * r19269829;
        double r19269831 = r19269828 + r19269830;
        double r19269832 = r19269827 * r19269831;
        return r19269832;
}

double f(double x, double y) {
        double r19269833 = y;
        double r19269834 = x;
        double r19269835 = r19269833 * r19269834;
        double r19269836 = r19269833 * r19269835;
        double r19269837 = 1.0;
        double r19269838 = r19269837 * r19269834;
        double r19269839 = r19269836 + r19269838;
        return r19269839;
}

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
Herbie0.1
\[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 distribute-rgt-in5.4

    \[\leadsto \color{blue}{1.0 \cdot x + \left(y \cdot y\right) \cdot x}\]
  4. Using strategy rm
  5. Applied associate-*l*0.1

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

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

Reproduce

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

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

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