\frac{x - y}{x + y}\mathsf{log1p}\left(\mathsf{expm1}\left(\frac{x - y}{x + y}\right)\right)double f(double x, double y) {
double r571423 = x;
double r571424 = y;
double r571425 = r571423 - r571424;
double r571426 = r571423 + r571424;
double r571427 = r571425 / r571426;
return r571427;
}
double f(double x, double y) {
double r571428 = x;
double r571429 = y;
double r571430 = r571428 - r571429;
double r571431 = r571428 + r571429;
double r571432 = r571430 / r571431;
double r571433 = expm1(r571432);
double r571434 = log1p(r571433);
return r571434;
}




Bits error versus x




Bits error versus y
Results
| Original | 0.0 |
|---|---|
| Target | 0.0 |
| Herbie | 0.0 |
Initial program 0.0
rmApplied log1p-expm1-u0.0
Final simplification0.0
herbie shell --seed 2020043 +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)))