Average Error: 19.5 → 0.1
Time: 2.4m
Precision: 64
Internal Precision: 384
\[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1.0\right)}\]
\[\frac{x}{x + y} \cdot \frac{\frac{y}{x + y}}{\left(y + 1.0\right) + x}\]

Error

Bits error versus x

Bits error versus y

Target

Original19.5
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.5

    \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1.0\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.0}}\]
  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.0}\]
  6. Using strategy rm
  7. Applied div-inv0.2

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

    \[\leadsto \color{blue}{\frac{x}{x + y} \cdot \left(\frac{1}{x + y} \cdot \frac{y}{\left(x + y\right) + 1.0}\right)}\]
  9. Applied simplify0.1

    \[\leadsto \frac{x}{x + y} \cdot \color{blue}{\frac{\frac{y}{x + y}}{\left(y + 1.0\right) + x}}\]
  10. Removed slow pow expressions.

Runtime

Time bar (total: 2.4m)Debug log

herbie shell --seed '#(1567391828 2030694642 2833800258 828025724 3004380912 3532991858)' +o setup:early-exit +o reduce:binary-search
(FPCore (x y)
  :name "Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, A"

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

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