Average Error: 19.9 → 0.1
Time: 21.8min
Precision: binary64
\[\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{y}{x + y} \cdot x}{x + y} \cdot \frac{1}{\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{y}{x + y} \cdot x}{x + y} \cdot \frac{1}{\left(x + y\right) + 1}
double code(double x, double y) {
	return (((double) (x * y)) / ((double) (((double) (((double) (x + y)) * ((double) (x + y)))) * ((double) (((double) (x + y)) + 1.0)))));
}
double code(double x, double y) {
	return ((double) ((((double) ((y / ((double) (x + y))) * x)) / ((double) (x + y))) * (1.0 / ((double) (((double) (x + y)) + 1.0)))));
}

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.9
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.9

    \[\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 flip-+19.9

    \[\leadsto \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \color{blue}{\frac{\left(x + y\right) \cdot \left(x + y\right) - 1 \cdot 1}{\left(x + y\right) - 1}}}\]
  4. Applied associate-*r/21.7

    \[\leadsto \frac{x \cdot y}{\color{blue}{\frac{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right) - 1 \cdot 1\right)}{\left(x + y\right) - 1}}}\]
  5. Applied associate-/r/22.7

    \[\leadsto \color{blue}{\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right) - 1 \cdot 1\right)} \cdot \left(\left(x + y\right) - 1\right)}\]
  6. Simplified8.5

    \[\leadsto \color{blue}{\left(\frac{y}{x + y} \cdot \frac{x}{{\left(x + y\right)}^{3} - \left(x + y\right) \cdot \left(1 \cdot 1\right)}\right)} \cdot \left(\left(x + y\right) - 1\right)\]
  7. Using strategy rm
  8. Applied flip--32.6

    \[\leadsto \left(\frac{y}{x + y} \cdot \frac{x}{{\left(x + y\right)}^{3} - \left(x + y\right) \cdot \left(1 \cdot 1\right)}\right) \cdot \color{blue}{\frac{\left(x + y\right) \cdot \left(x + y\right) - 1 \cdot 1}{\left(x + y\right) + 1}}\]
  9. Applied associate-*r/32.6

    \[\leadsto \color{blue}{\frac{\left(\frac{y}{x + y} \cdot \frac{x}{{\left(x + y\right)}^{3} - \left(x + y\right) \cdot \left(1 \cdot 1\right)}\right) \cdot \left(\left(x + y\right) \cdot \left(x + y\right) - 1 \cdot 1\right)}{\left(x + y\right) + 1}}\]
  10. Simplified0.1

    \[\leadsto \frac{\color{blue}{1 \cdot \frac{\frac{y}{x + y} \cdot x}{x + y}}}{\left(x + y\right) + 1}\]
  11. Using strategy rm
  12. Applied div-inv0.1

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

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

Reproduce

herbie shell --seed 2020181 
(FPCore (x y)
  :name "Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, A"
  :precision binary64

  :herbie-target
  (/ (/ (/ x (+ (+ y 1.0) x)) (+ y x)) (/ 1.0 (/ y (+ y x))))

  (/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))