\frac{x - y}{2 - \left(x + y\right)}\mathsf{log1p}\left(\mathsf{expm1}\left(\frac{x}{2 - \left(x + y\right)}\right)\right) - \frac{y}{2 - \left(x + y\right)}double f(double x, double y) {
double r992826 = x;
double r992827 = y;
double r992828 = r992826 - r992827;
double r992829 = 2.0;
double r992830 = r992826 + r992827;
double r992831 = r992829 - r992830;
double r992832 = r992828 / r992831;
return r992832;
}
double f(double x, double y) {
double r992833 = x;
double r992834 = 2.0;
double r992835 = y;
double r992836 = r992833 + r992835;
double r992837 = r992834 - r992836;
double r992838 = r992833 / r992837;
double r992839 = expm1(r992838);
double r992840 = log1p(r992839);
double r992841 = r992835 / r992837;
double r992842 = r992840 - r992841;
return r992842;
}




Bits error versus x




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