\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 r885303 = x;
double r885304 = y;
double r885305 = r885303 - r885304;
double r885306 = 2.0;
double r885307 = r885303 + r885304;
double r885308 = r885306 - r885307;
double r885309 = r885305 / r885308;
return r885309;
}
double f(double x, double y) {
double r885310 = x;
double r885311 = y;
double r885312 = r885310 - r885311;
double r885313 = 2.0;
double r885314 = r885310 + r885311;
double r885315 = r885313 - r885314;
double r885316 = r885312 / r885315;
double r885317 = expm1(r885316);
double r885318 = log1p(r885317);
return r885318;
}




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