\frac{x - y}{2 - \left(x + y\right)}\mathsf{log1p}\left(\mathsf{expm1}\left(\frac{x - y}{2 - \left(x + y\right)}\right)\right)double f(double x, double y) {
double r870721 = x;
double r870722 = y;
double r870723 = r870721 - r870722;
double r870724 = 2.0;
double r870725 = r870721 + r870722;
double r870726 = r870724 - r870725;
double r870727 = r870723 / r870726;
return r870727;
}
double f(double x, double y) {
double r870728 = x;
double r870729 = y;
double r870730 = r870728 - r870729;
double r870731 = 2.0;
double r870732 = r870728 + r870729;
double r870733 = r870731 - r870732;
double r870734 = r870730 / r870733;
double r870735 = expm1(r870734);
double r870736 = log1p(r870735);
return r870736;
}




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, C"
:precision binary64
:herbie-target
(- (/ x (- 2 (+ x y))) (/ y (- 2 (+ x y))))
(/ (- x y) (- 2 (+ x y))))