Average Error: 19.8 → 9.5
Time: 15.6s
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 \cdot x + y \cdot \left(2 \cdot x + y\right)} \cdot 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{x}{x \cdot x + y \cdot \left(2 \cdot x + y\right)} \cdot y}{\left(x + y\right) + 1}
double f(double x, double y) {
        double r309182 = x;
        double r309183 = y;
        double r309184 = r309182 * r309183;
        double r309185 = r309182 + r309183;
        double r309186 = r309185 * r309185;
        double r309187 = 1.0;
        double r309188 = r309185 + r309187;
        double r309189 = r309186 * r309188;
        double r309190 = r309184 / r309189;
        return r309190;
}

double f(double x, double y) {
        double r309191 = x;
        double r309192 = r309191 * r309191;
        double r309193 = y;
        double r309194 = 2.0;
        double r309195 = r309194 * r309191;
        double r309196 = r309195 + r309193;
        double r309197 = r309193 * r309196;
        double r309198 = r309192 + r309197;
        double r309199 = r309191 / r309198;
        double r309200 = r309199 * r309193;
        double r309201 = r309191 + r309193;
        double r309202 = 1.0;
        double r309203 = r309201 + r309202;
        double r309204 = r309200 / r309203;
        return r309204;
}

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

Derivation

  1. Initial program 19.8

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

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

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

    \[\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. Using strategy rm
  7. Applied associate-*r/9.5

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

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

Reproduce

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