Average Error: 5.4 → 5.4
Time: 3.7s
Precision: 64
\[x \cdot \left(1 + y \cdot y\right)\]
\[x \cdot \left(1 + y \cdot y\right)\]
x \cdot \left(1 + y \cdot y\right)
x \cdot \left(1 + y \cdot y\right)
double f(double x, double y) {
        double r500450 = x;
        double r500451 = 1.0;
        double r500452 = y;
        double r500453 = r500452 * r500452;
        double r500454 = r500451 + r500453;
        double r500455 = r500450 * r500454;
        return r500455;
}

double f(double x, double y) {
        double r500456 = x;
        double r500457 = 1.0;
        double r500458 = y;
        double r500459 = r500458 * r500458;
        double r500460 = r500457 + r500459;
        double r500461 = r500456 * r500460;
        return r500461;
}

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

Reproduce

herbie shell --seed 2020025 +o rules:numerics
(FPCore (x y)
  :name "Numeric.Integration.TanhSinh:everywhere from integration-0.2.1"
  :precision binary64

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

  (* x (+ 1 (* y y))))