\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 r869310 = x;
double r869311 = y;
double r869312 = r869310 - r869311;
double r869313 = r869310 + r869311;
double r869314 = r869312 / r869313;
return r869314;
}
double f(double x, double y) {
double r869315 = x;
double r869316 = y;
double r869317 = r869315 - r869316;
double r869318 = r869315 + r869316;
double r869319 = r869317 / r869318;
double r869320 = expm1(r869319);
double r869321 = log1p(r869320);
return r869321;
}




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 2020036 +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)))