Average Error: 19.4 → 0.2
Time: 15.4s
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}{y + x}}{\frac{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}{y + x}}{\frac{y + x}{y}}}{\left(x + y\right) + 1}
double f(double x, double y) {
        double r285814 = x;
        double r285815 = y;
        double r285816 = r285814 * r285815;
        double r285817 = r285814 + r285815;
        double r285818 = r285817 * r285817;
        double r285819 = 1.0;
        double r285820 = r285817 + r285819;
        double r285821 = r285818 * r285820;
        double r285822 = r285816 / r285821;
        return r285822;
}

double f(double x, double y) {
        double r285823 = x;
        double r285824 = y;
        double r285825 = r285824 + r285823;
        double r285826 = r285823 / r285825;
        double r285827 = r285825 / r285824;
        double r285828 = r285826 / r285827;
        double r285829 = r285823 + r285824;
        double r285830 = 1.0;
        double r285831 = r285829 + r285830;
        double r285832 = r285828 / r285831;
        return r285832;
}

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.4
Target0.2
Herbie0.2
\[\frac{\frac{\frac{x}{\left(y + 1\right) + x}}{y + x}}{\frac{1}{\frac{y}{y + x}}}\]

Derivation

  1. Initial program 19.4

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

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

    \[\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}{y + x} \cdot y}{y + x}}}{\left(x + y\right) + 1}\]
  12. Using strategy rm
  13. Applied associate-/l*0.2

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

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

Reproduce

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