Average Error: 19.6 → 9.1
Time: 14.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{x}{x \cdot x + y \cdot \left(2 \cdot x + y\right)} \cdot \frac{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{x}{x \cdot x + y \cdot \left(2 \cdot x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}
double f(double x, double y) {
        double r333070 = x;
        double r333071 = y;
        double r333072 = r333070 * r333071;
        double r333073 = r333070 + r333071;
        double r333074 = r333073 * r333073;
        double r333075 = 1.0;
        double r333076 = r333073 + r333075;
        double r333077 = r333074 * r333076;
        double r333078 = r333072 / r333077;
        return r333078;
}

double f(double x, double y) {
        double r333079 = x;
        double r333080 = r333079 * r333079;
        double r333081 = y;
        double r333082 = 2.0;
        double r333083 = r333082 * r333079;
        double r333084 = r333083 + r333081;
        double r333085 = r333081 * r333084;
        double r333086 = r333080 + r333085;
        double r333087 = r333079 / r333086;
        double r333088 = r333079 + r333081;
        double r333089 = 1.0;
        double r333090 = r333088 + r333089;
        double r333091 = r333081 / r333090;
        double r333092 = r333087 * r333091;
        return r333092;
}

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

Derivation

  1. Initial program 19.6

    \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}\]
  2. Taylor expanded around 0 19.6

    \[\leadsto \frac{x \cdot y}{\color{blue}{\left({x}^{2} + \left({y}^{2} + 2 \cdot \left(x \cdot y\right)\right)\right)} \cdot \left(\left(x + y\right) + 1\right)}\]
  3. Simplified19.6

    \[\leadsto \frac{x \cdot y}{\color{blue}{\left(x \cdot x + y \cdot \left(2 \cdot x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)}\]
  4. Using strategy rm
  5. Applied times-frac9.1

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

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

Reproduce

herbie shell --seed 2019325 
(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))))