Average Error: 5.4 → 0.1
Time: 12.7s
Precision: 64
\[x \cdot \left(1.0 + y \cdot y\right)\]
\[y \cdot \left(y \cdot x\right) + x \cdot 1.0\]
x \cdot \left(1.0 + y \cdot y\right)
y \cdot \left(y \cdot x\right) + x \cdot 1.0
double f(double x, double y) {
        double r25755325 = x;
        double r25755326 = 1.0;
        double r25755327 = y;
        double r25755328 = r25755327 * r25755327;
        double r25755329 = r25755326 + r25755328;
        double r25755330 = r25755325 * r25755329;
        return r25755330;
}

double f(double x, double y) {
        double r25755331 = y;
        double r25755332 = x;
        double r25755333 = r25755331 * r25755332;
        double r25755334 = r25755331 * r25755333;
        double r25755335 = 1.0;
        double r25755336 = r25755332 * r25755335;
        double r25755337 = r25755334 + r25755336;
        return r25755337;
}

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-lft-in5.4

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

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

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

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