\frac{x - y}{x + y}\mathsf{log1p}\left(\mathsf{expm1}\left(\frac{x - y}{x + y}\right)\right)double f(double x, double y) {
double r497712 = x;
double r497713 = y;
double r497714 = r497712 - r497713;
double r497715 = r497712 + r497713;
double r497716 = r497714 / r497715;
return r497716;
}
double f(double x, double y) {
double r497717 = x;
double r497718 = y;
double r497719 = r497717 - r497718;
double r497720 = r497717 + r497718;
double r497721 = r497719 / r497720;
double r497722 = expm1(r497721);
double r497723 = log1p(r497722);
return r497723;
}




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