Average Error: 5.4 → 0.1
Time: 8.6s
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 r322266 = x;
        double r322267 = 1.0;
        double r322268 = y;
        double r322269 = r322268 * r322268;
        double r322270 = r322267 + r322269;
        double r322271 = r322266 * r322270;
        return r322271;
}

double f(double x, double y) {
        double r322272 = y;
        double r322273 = x;
        double r322274 = r322272 * r322273;
        double r322275 = r322272 * r322274;
        double r322276 = 1.0;
        double r322277 = r322273 * r322276;
        double r322278 = r322275 + r322277;
        return r322278;
}

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 + y \cdot y\right)\]
  2. Using strategy rm
  3. Applied distribute-lft-in5.4

    \[\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 2019196 
(FPCore (x y)
  :name "Numeric.Integration.TanhSinh:everywhere from integration-0.2.1"

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

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