Average Error: 19.6 → 0.1
Time: 19.3s
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 \cdot \frac{x}{y + x}}{x + \left(y + 1\right)}}{y + x}\]
\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 \cdot \frac{x}{y + x}}{x + \left(y + 1\right)}}{y + x}
(FPCore (x y)
 :precision binary64
 (/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))
(FPCore (x y)
 :precision binary64
 (/ (/ (* y (/ x (+ y x))) (+ x (+ y 1.0))) (+ y x)))
double code(double x, double y) {
	return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0));
}
double code(double x, double y) {
	return ((y * (x / (y + x))) / (x + (y + 1.0))) / (y + x);
}

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. Simplified0.1

    \[\leadsto \color{blue}{\frac{x}{x + y} \cdot \frac{\frac{y}{x + y}}{x + \left(y + 1\right)}}\]
  3. Using strategy rm
  4. Applied pow1_binary64_69590.1

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

    \[\leadsto \color{blue}{{\left(\frac{x}{x + y}\right)}^{1}} \cdot {\left(\frac{\frac{y}{x + y}}{x + \left(y + 1\right)}\right)}^{1}\]
  6. Applied pow-prod-down_binary64_69690.1

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

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

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

Reproduce

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