Average Error: 20.3 → 0.2
Time: 3.4s
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{y}{\left(x + y\right) + 1} \cdot \frac{1}{\frac{x + y}{x}}}{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{y}{\left(x + y\right) + 1} \cdot \frac{1}{\frac{x + y}{x}}}{x + y}
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) (((double) (y / ((double) (((double) (x + y)) + 1.0)))) * ((double) (1.0 / ((double) (((double) (x + y)) / x)))))) / ((double) (x + y))));
}

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

Derivation

  1. Initial program 20.3

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

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

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

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

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

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

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

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

Reproduce

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