Average Error: 5.3 → 5.3
Time: 3.6s
Precision: 64
\[x \cdot \left(1 + y \cdot y\right)\]
\[x \cdot \left(y \cdot y + 1\right)\]
x \cdot \left(1 + y \cdot y\right)
x \cdot \left(y \cdot y + 1\right)
double f(double x, double y) {
        double r415329 = x;
        double r415330 = 1.0;
        double r415331 = y;
        double r415332 = r415331 * r415331;
        double r415333 = r415330 + r415332;
        double r415334 = r415329 * r415333;
        return r415334;
}

double f(double x, double y) {
        double r415335 = x;
        double r415336 = y;
        double r415337 = r415336 * r415336;
        double r415338 = 1.0;
        double r415339 = r415337 + r415338;
        double r415340 = r415335 * r415339;
        return r415340;
}

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

Derivation

  1. Initial program 5.3

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

    \[\leadsto \color{blue}{x \cdot 1 + x \cdot \left(y \cdot y\right)}\]
  4. Using strategy rm
  5. Applied associate-*r*0.1

    \[\leadsto x \cdot 1 + \color{blue}{\left(x \cdot y\right) \cdot y}\]
  6. Final simplification5.3

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

Reproduce

herbie shell --seed 1978988140 
(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))))