Average Error: 5.1 → 0.1
Time: 12.6s
Precision: 64
\[x \cdot \left(1 + y \cdot y\right)\]
\[y \cdot \left(y \cdot x\right) + 1 \cdot x\]
x \cdot \left(1 + y \cdot y\right)
y \cdot \left(y \cdot x\right) + 1 \cdot x
double f(double x, double y) {
        double r23839292 = x;
        double r23839293 = 1.0;
        double r23839294 = y;
        double r23839295 = r23839294 * r23839294;
        double r23839296 = r23839293 + r23839295;
        double r23839297 = r23839292 * r23839296;
        return r23839297;
}

double f(double x, double y) {
        double r23839298 = y;
        double r23839299 = x;
        double r23839300 = r23839298 * r23839299;
        double r23839301 = r23839298 * r23839300;
        double r23839302 = 1.0;
        double r23839303 = r23839302 * r23839299;
        double r23839304 = r23839301 + r23839303;
        return r23839304;
}

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

Derivation

  1. Initial program 5.1

    \[x \cdot \left(1 + y \cdot y\right)\]
  2. Using strategy rm
  3. Applied distribute-rgt-in5.1

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

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

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

Reproduce

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

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

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