Average Error: 20.2 → 0.1
Time: 4.7s
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{x}{x + y} \cdot \frac{y}{\left(x + y\right) + 1}}{x + y}\]
\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{x}{x + y} \cdot \frac{y}{\left(x + y\right) + 1}}{x + y}
double f(double x, double y) {
        double r611424 = x;
        double r611425 = y;
        double r611426 = r611424 * r611425;
        double r611427 = r611424 + r611425;
        double r611428 = r611427 * r611427;
        double r611429 = 1.0;
        double r611430 = r611427 + r611429;
        double r611431 = r611428 * r611430;
        double r611432 = r611426 / r611431;
        return r611432;
}

double f(double x, double y) {
        double r611433 = x;
        double r611434 = y;
        double r611435 = r611433 + r611434;
        double r611436 = r611433 / r611435;
        double r611437 = 1.0;
        double r611438 = r611435 + r611437;
        double r611439 = r611434 / r611438;
        double r611440 = r611436 * r611439;
        double r611441 = r611440 / r611435;
        return r611441;
}

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.2
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.0

    \[\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.0

    \[\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 *-un-lft-identity0.2

    \[\leadsto \frac{1}{\color{blue}{1 \cdot \left(x + y\right)}} \cdot \left(\frac{x}{x + y} \cdot \frac{y}{\left(x + y\right) + 1}\right)\]
  10. Applied *-un-lft-identity0.2

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

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

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

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

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

Reproduce

herbie shell --seed 2020100 +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))))