\frac{x - y}{x + y}\log \left(e^{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{x - y}{x + y}\right)\right)}\right)double f(double x, double y) {
double r889183 = x;
double r889184 = y;
double r889185 = r889183 - r889184;
double r889186 = r889183 + r889184;
double r889187 = r889185 / r889186;
return r889187;
}
double f(double x, double y) {
double r889188 = x;
double r889189 = y;
double r889190 = r889188 - r889189;
double r889191 = r889188 + r889189;
double r889192 = r889190 / r889191;
double r889193 = log1p(r889192);
double r889194 = expm1(r889193);
double r889195 = exp(r889194);
double r889196 = log(r889195);
return r889196;
}




Bits error versus x




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