\frac{x - y}{x + y}\log \left(e^{\frac{x}{y + x}}\right) - \log \left(e^{\frac{y}{y + x}}\right)double f(double x, double y) {
double r40233428 = x;
double r40233429 = y;
double r40233430 = r40233428 - r40233429;
double r40233431 = r40233428 + r40233429;
double r40233432 = r40233430 / r40233431;
return r40233432;
}
double f(double x, double y) {
double r40233433 = x;
double r40233434 = y;
double r40233435 = r40233434 + r40233433;
double r40233436 = r40233433 / r40233435;
double r40233437 = exp(r40233436);
double r40233438 = log(r40233437);
double r40233439 = r40233434 / r40233435;
double r40233440 = exp(r40233439);
double r40233441 = log(r40233440);
double r40233442 = r40233438 - r40233441;
return r40233442;
}




Bits error versus x




Bits error versus y
Results
| Original | 0.0 |
|---|---|
| Target | 0.0 |
| Herbie | 0.0 |
Initial program 0.0
rmApplied div-sub0.0
rmApplied add-log-exp0.0
rmApplied add-log-exp0.0
Final simplification0.0
herbie shell --seed 2019192
(FPCore (x y)
:name "Data.Colour.RGB:hslsv from colour-2.3.3, D"
:herbie-target
(- (/ x (+ x y)) (/ y (+ x y)))
(/ (- x y) (+ x y)))