Average Error: 19.9 → 0.1
Time: 9.8s
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)}\]
\[\sqrt{1} \cdot \frac{\frac{\frac{x}{x + y} \cdot y}{\left(x + y\right) + 1}}{y + x}\]
\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}
\sqrt{1} \cdot \frac{\frac{\frac{x}{x + y} \cdot y}{\left(x + y\right) + 1}}{y + x}
double f(double x, double y) {
        double r427350 = x;
        double r427351 = y;
        double r427352 = r427350 * r427351;
        double r427353 = r427350 + r427351;
        double r427354 = r427353 * r427353;
        double r427355 = 1.0;
        double r427356 = r427353 + r427355;
        double r427357 = r427354 * r427356;
        double r427358 = r427352 / r427357;
        return r427358;
}

double f(double x, double y) {
        double r427359 = 1.0;
        double r427360 = sqrt(r427359);
        double r427361 = x;
        double r427362 = y;
        double r427363 = r427361 + r427362;
        double r427364 = r427361 / r427363;
        double r427365 = r427364 * r427362;
        double r427366 = 1.0;
        double r427367 = r427363 + r427366;
        double r427368 = r427365 / r427367;
        double r427369 = r427362 + r427361;
        double r427370 = r427368 / r427369;
        double r427371 = r427360 * r427370;
        return r427371;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original19.9
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 19.9

    \[\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 add-sqr-sqrt0.2

    \[\leadsto \frac{\color{blue}{\sqrt{1} \cdot \sqrt{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{\sqrt{1}}{1} \cdot \frac{\sqrt{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{\sqrt{1}}{1} \cdot \left(\frac{\sqrt{1}}{x + y} \cdot \left(\frac{x}{x + y} \cdot \frac{y}{\left(x + y\right) + 1}\right)\right)}\]
  13. Simplified0.1

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

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

Reproduce

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