\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 r765688 = x;
double r765689 = y;
double r765690 = r765688 - r765689;
double r765691 = r765688 + r765689;
double r765692 = r765690 / r765691;
return r765692;
}
double f(double x, double y) {
double r765693 = x;
double r765694 = y;
double r765695 = r765693 - r765694;
double r765696 = r765693 + r765694;
double r765697 = r765695 / r765696;
double r765698 = log1p(r765697);
double r765699 = expm1(r765698);
double r765700 = exp(r765699);
double r765701 = log(r765700);
return r765701;
}




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