Average Error: 4.9 → 0.1
Time: 11.3s
Precision: 64
\[x \cdot \left(1 + y \cdot y\right)\]
\[y \cdot \left(y \cdot x\right) + x \cdot 1\]
x \cdot \left(1 + y \cdot y\right)
y \cdot \left(y \cdot x\right) + x \cdot 1
double f(double x, double y) {
        double r473332 = x;
        double r473333 = 1.0;
        double r473334 = y;
        double r473335 = r473334 * r473334;
        double r473336 = r473333 + r473335;
        double r473337 = r473332 * r473336;
        return r473337;
}

double f(double x, double y) {
        double r473338 = y;
        double r473339 = x;
        double r473340 = r473338 * r473339;
        double r473341 = r473338 * r473340;
        double r473342 = 1.0;
        double r473343 = r473339 * r473342;
        double r473344 = r473341 + r473343;
        return r473344;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original4.9
Target0.1
Herbie0.1
\[x + \left(x \cdot y\right) \cdot y\]

Derivation

  1. Initial program 4.9

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

    \[\leadsto \color{blue}{x \cdot 1 + x \cdot \left(y \cdot y\right)}\]
  4. Simplified0.1

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

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

Reproduce

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

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

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