Average Error: 20.2 → 0.1
Time: 15.3s
Precision: 64
\[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}\]
\[\frac{\frac{\frac{x}{x + y} \cdot y}{x + y}}{\left(x + y\right) + 1}\]
\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}
\frac{\frac{\frac{x}{x + y} \cdot y}{x + y}}{\left(x + y\right) + 1}
double f(double x, double y) {
        double r210439 = x;
        double r210440 = y;
        double r210441 = r210439 * r210440;
        double r210442 = r210439 + r210440;
        double r210443 = r210442 * r210442;
        double r210444 = 1.0;
        double r210445 = r210442 + r210444;
        double r210446 = r210443 * r210445;
        double r210447 = r210441 / r210446;
        return r210447;
}

double f(double x, double y) {
        double r210448 = x;
        double r210449 = y;
        double r210450 = r210448 + r210449;
        double r210451 = r210448 / r210450;
        double r210452 = r210451 * r210449;
        double r210453 = r210452 / r210450;
        double r210454 = 1.0;
        double r210455 = r210450 + r210454;
        double r210456 = r210453 / r210455;
        return r210456;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original20.2
Target0.1
Herbie0.1
\[\frac{\frac{\frac{x}{\left(y + 1\right) + x}}{y + x}}{\frac{1}{\frac{y}{y + x}}}\]

Derivation

  1. Initial program 20.2

    \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}\]
  2. Using strategy rm
  3. Applied times-frac8.3

    \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}}\]
  4. Using strategy rm
  5. Applied *-un-lft-identity8.3

    \[\leadsto \frac{\color{blue}{1 \cdot x}}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}\]
  6. Applied times-frac0.2

    \[\leadsto \color{blue}{\left(\frac{1}{x + y} \cdot \frac{x}{x + y}\right)} \cdot \frac{y}{\left(x + y\right) + 1}\]
  7. Applied associate-*l*0.2

    \[\leadsto \color{blue}{\frac{1}{x + y} \cdot \left(\frac{x}{x + y} \cdot \frac{y}{\left(x + y\right) + 1}\right)}\]
  8. Using strategy rm
  9. Applied associate-*r/0.2

    \[\leadsto \frac{1}{x + y} \cdot \color{blue}{\frac{\frac{x}{x + y} \cdot y}{\left(x + y\right) + 1}}\]
  10. Applied associate-*r/0.2

    \[\leadsto \color{blue}{\frac{\frac{1}{x + y} \cdot \left(\frac{x}{x + y} \cdot y\right)}{\left(x + y\right) + 1}}\]
  11. Simplified0.1

    \[\leadsto \frac{\color{blue}{\frac{\frac{x}{x + y} \cdot y}{x + y}}}{\left(x + y\right) + 1}\]
  12. Final simplification0.1

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

Reproduce

herbie shell --seed 2019326 +o rules:numerics
(FPCore (x y)
  :name "Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, A"
  :precision binary64

  :herbie-target
  (/ (/ (/ x (+ (+ y 1) x)) (+ y x)) (/ 1 (/ y (+ y x))))

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