Average Error: 20.2 → 0.1
Time: 14.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)}\]
\[\frac{\frac{\frac{x}{x + y} \cdot 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}{x + y} \cdot y}{x + y}}{\left(x + y\right) + 1}
double f(double x, double y) {
        double r268173 = x;
        double r268174 = y;
        double r268175 = r268173 * r268174;
        double r268176 = r268173 + r268174;
        double r268177 = r268176 * r268176;
        double r268178 = 1.0;
        double r268179 = r268176 + r268178;
        double r268180 = r268177 * r268179;
        double r268181 = r268175 / r268180;
        return r268181;
}

double f(double x, double y) {
        double r268182 = x;
        double r268183 = y;
        double r268184 = r268182 + r268183;
        double r268185 = r268182 / r268184;
        double r268186 = r268185 * r268183;
        double r268187 = r268186 / r268184;
        double r268188 = 1.0;
        double r268189 = r268184 + r268188;
        double r268190 = r268187 / r268189;
        return r268190;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original20.2
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 20.2

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

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

    \[\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}{x + y} \cdot y}{x + y}}}{\left(x + y\right) + 1}\]
  12. Final simplification0.1

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

Reproduce

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