Average Error: 19.7 → 0.5
Time: 3.2s
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{x}{x + y} \cdot \frac{1}{\frac{1}{\frac{y}{x + y}} \cdot \left(y + \left(x + 1\right)\right)}\]
\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 + y} \cdot \frac{1}{\frac{1}{\frac{y}{x + y}} \cdot \left(y + \left(x + 1\right)\right)}
double code(double x, double y) {
	return ((double) (((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) (x / ((double) (x + y)))) * ((double) (1.0 / ((double) (((double) (1.0 / ((double) (y / ((double) (x + y)))))) * ((double) (y + ((double) (x + 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.7
Target0.1
Herbie0.5
\[\frac{\frac{\frac{x}{\left(y + 1\right) + x}}{y + x}}{\frac{1}{\frac{y}{y + x}}}\]

Derivation

  1. Initial program 19.7

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

    \[\leadsto \color{blue}{x \cdot \frac{y}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + \left(y + 1\right)\right)\right)}}\]
  3. Using strategy rm
  4. Applied *-un-lft-identity11.7

    \[\leadsto x \cdot \frac{\color{blue}{1 \cdot y}}{\left(x + y\right) \cdot \left(\left(x + y\right) \cdot \left(x + \left(y + 1\right)\right)\right)}\]
  5. Applied times-frac6.3

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

    \[\leadsto \color{blue}{\left(x \cdot \frac{1}{x + y}\right) \cdot \frac{y}{\left(x + y\right) \cdot \left(x + \left(y + 1\right)\right)}}\]
  7. Simplified4.3

    \[\leadsto \color{blue}{\frac{x}{y + x}} \cdot \frac{y}{\left(x + y\right) \cdot \left(x + \left(y + 1\right)\right)}\]
  8. Using strategy rm
  9. Applied clear-num4.5

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

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

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

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

Reproduce

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