Average Error: 5.4 → 5.4
Time: 9.6s
Precision: 64
\[x \cdot \left(1 + y \cdot y\right)\]
\[\left(1 + y \cdot y\right) \cdot x\]
x \cdot \left(1 + y \cdot y\right)
\left(1 + y \cdot y\right) \cdot x
double f(double x, double y) {
        double r8580203 = x;
        double r8580204 = 1.0;
        double r8580205 = y;
        double r8580206 = r8580205 * r8580205;
        double r8580207 = r8580204 + r8580206;
        double r8580208 = r8580203 * r8580207;
        return r8580208;
}

double f(double x, double y) {
        double r8580209 = 1.0;
        double r8580210 = y;
        double r8580211 = r8580210 * r8580210;
        double r8580212 = r8580209 + r8580211;
        double r8580213 = x;
        double r8580214 = r8580212 * r8580213;
        return r8580214;
}

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

Derivation

  1. Initial program 5.4

    \[x \cdot \left(1 + y \cdot y\right)\]
  2. Final simplification5.4

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

Reproduce

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

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

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