Average Error: 19.6 → 0.1
Time: 16.0s
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 \frac{y}{\left(x + y\right) + 1}}{x + y}\]
\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 \frac{y}{\left(x + y\right) + 1}}{x + y}
double f(double x, double y) {
        double r303284 = x;
        double r303285 = y;
        double r303286 = r303284 * r303285;
        double r303287 = r303284 + r303285;
        double r303288 = r303287 * r303287;
        double r303289 = 1.0;
        double r303290 = r303287 + r303289;
        double r303291 = r303288 * r303290;
        double r303292 = r303286 / r303291;
        return r303292;
}

double f(double x, double y) {
        double r303293 = x;
        double r303294 = y;
        double r303295 = r303293 + r303294;
        double r303296 = r303293 / r303295;
        double r303297 = 1.0;
        double r303298 = r303295 + r303297;
        double r303299 = r303294 / r303298;
        double r303300 = r303296 * r303299;
        double r303301 = r303300 / r303295;
        return r303301;
}

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
Herbie0.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. Using strategy rm
  3. Applied times-frac7.7

    \[\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 associate-/r*0.2

    \[\leadsto \color{blue}{\frac{\frac{x}{x + y}}{x + y}} \cdot \frac{y}{\left(x + y\right) + 1}\]
  6. Using strategy rm
  7. Applied associate-*l/0.1

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

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

Reproduce

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