\frac{x - y}{x + y}\log \left(e^{\frac{x}{x + y}}\right) - \mathsf{expm1}\left(\mathsf{log1p}\left(\frac{y}{x + y}\right)\right)double f(double x, double y) {
double r731518 = x;
double r731519 = y;
double r731520 = r731518 - r731519;
double r731521 = r731518 + r731519;
double r731522 = r731520 / r731521;
return r731522;
}
double f(double x, double y) {
double r731523 = x;
double r731524 = y;
double r731525 = r731523 + r731524;
double r731526 = r731523 / r731525;
double r731527 = exp(r731526);
double r731528 = log(r731527);
double r731529 = r731524 / r731525;
double r731530 = log1p(r731529);
double r731531 = expm1(r731530);
double r731532 = r731528 - r731531;
return r731532;
}




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 expm1-log1p-u0.0
Final simplification0.0
herbie shell --seed 2020033 +o rules:numerics
(FPCore (x y)
:name "Data.Colour.RGB:hslsv from colour-2.3.3, D"
:precision binary64
:herbie-target
(- (/ x (+ x y)) (/ y (+ x y)))
(/ (- x y) (+ x y)))