\frac{x + y}{y + y}0.5 \cdot \left(1 + \frac{x}{y}\right)(FPCore (x y) :precision binary64 (/ (+ x y) (+ y y)))
(FPCore (x y) :precision binary64 (* 0.5 (+ 1.0 (/ x y))))
double code(double x, double y) {
return (((double) (x + y)) / ((double) (y + y)));
}
double code(double x, double y) {
return ((double) (0.5 * ((double) (1.0 + (x / y)))));
}




Bits error versus x




Bits error versus y
Results
| Original | 0.0 |
|---|---|
| Target | 0.0 |
| Herbie | 0.0 |
Initial program Error: 0.0 bits
rmApplied *-un-lft-identityError: 0.0 bits
Applied distribute-lft1-inError: 0.0 bits
Applied *-un-lft-identityError: 0.0 bits
Applied times-fracError: 0.0 bits
SimplifiedError: 0.0 bits
Taylor expanded around 0 Error: 0.0 bits
SimplifiedError: 0.0 bits
Final simplificationError: 0.0 bits
herbie shell --seed 2020203
(FPCore (x y)
:name "Data.Random.Distribution.T:$ccdf from random-fu-0.2.6.2"
:precision binary64
:herbie-target
(+ (* 0.5 (/ x y)) 0.5)
(/ (+ x y) (+ y y)))