Average Error: 19.1 → 0.1
Time: 10.5s
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 \left(y \cdot \frac{1}{\left(x + y\right) + 1}\right)}{y + x} \cdot \left(\sqrt[3]{1} \cdot \sqrt[3]{1}\right)\]
\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 \left(y \cdot \frac{1}{\left(x + y\right) + 1}\right)}{y + x} \cdot \left(\sqrt[3]{1} \cdot \sqrt[3]{1}\right)
double f(double x, double y) {
        double r629319 = x;
        double r629320 = y;
        double r629321 = r629319 * r629320;
        double r629322 = r629319 + r629320;
        double r629323 = r629322 * r629322;
        double r629324 = 1.0;
        double r629325 = r629322 + r629324;
        double r629326 = r629323 * r629325;
        double r629327 = r629321 / r629326;
        return r629327;
}

double f(double x, double y) {
        double r629328 = x;
        double r629329 = y;
        double r629330 = r629328 + r629329;
        double r629331 = r629328 / r629330;
        double r629332 = 1.0;
        double r629333 = 1.0;
        double r629334 = r629330 + r629333;
        double r629335 = r629332 / r629334;
        double r629336 = r629329 * r629335;
        double r629337 = r629331 * r629336;
        double r629338 = r629329 + r629328;
        double r629339 = r629337 / r629338;
        double r629340 = cbrt(r629332);
        double r629341 = r629340 * r629340;
        double r629342 = r629339 * r629341;
        return r629342;
}

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.1
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.1

    \[\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-frac7.5

    \[\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-identity7.5

    \[\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-cube-cbrt0.2

    \[\leadsto \frac{\color{blue}{\left(\sqrt[3]{1} \cdot \sqrt[3]{1}\right) \cdot \sqrt[3]{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[3]{1} \cdot \sqrt[3]{1}}{1} \cdot \frac{\sqrt[3]{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[3]{1} \cdot \sqrt[3]{1}}{1} \cdot \left(\frac{\sqrt[3]{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[3]{1} \cdot \sqrt[3]{1}}{1} \cdot \color{blue}{\frac{\frac{x}{x + y} \cdot \frac{y}{\left(x + y\right) + 1}}{y + x}}\]
  14. Using strategy rm
  15. Applied div-inv0.1

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

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

Reproduce

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