\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 r892096 = x;
double r892097 = y;
double r892098 = r892096 - r892097;
double r892099 = 2.0;
double r892100 = r892096 + r892097;
double r892101 = r892099 - r892100;
double r892102 = r892098 / r892101;
return r892102;
}
double f(double x, double y) {
double r892103 = x;
double r892104 = y;
double r892105 = r892103 - r892104;
double r892106 = 2.0;
double r892107 = r892103 + r892104;
double r892108 = r892106 - r892107;
double r892109 = r892105 / r892108;
double r892110 = expm1(r892109);
double r892111 = log1p(r892110);
return r892111;
}




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