Average Error: 4.9 → 4.9
Time: 11.4s
Precision: 64
\[x \cdot \left(1.0 + y \cdot y\right)\]
\[\left(1.0 + y \cdot y\right) \cdot x\]
x \cdot \left(1.0 + y \cdot y\right)
\left(1.0 + y \cdot y\right) \cdot x
double f(double x, double y) {
        double r25824303 = x;
        double r25824304 = 1.0;
        double r25824305 = y;
        double r25824306 = r25824305 * r25824305;
        double r25824307 = r25824304 + r25824306;
        double r25824308 = r25824303 * r25824307;
        return r25824308;
}

double f(double x, double y) {
        double r25824309 = 1.0;
        double r25824310 = y;
        double r25824311 = r25824310 * r25824310;
        double r25824312 = r25824309 + r25824311;
        double r25824313 = x;
        double r25824314 = r25824312 * r25824313;
        return r25824314;
}

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

Derivation

  1. Initial program 4.9

    \[x \cdot \left(1.0 + y \cdot y\right)\]
  2. Final simplification4.9

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

Reproduce

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

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

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