\frac{x - y}{x + y}\frac{x}{x + y} - \mathsf{expm1}\left(\mathsf{log1p}\left(\frac{y}{x + y}\right)\right)double f(double x, double y) {
double r565424 = x;
double r565425 = y;
double r565426 = r565424 - r565425;
double r565427 = r565424 + r565425;
double r565428 = r565426 / r565427;
return r565428;
}
double f(double x, double y) {
double r565429 = x;
double r565430 = y;
double r565431 = r565429 + r565430;
double r565432 = r565429 / r565431;
double r565433 = r565430 / r565431;
double r565434 = log1p(r565433);
double r565435 = expm1(r565434);
double r565436 = r565432 - r565435;
return r565436;
}




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 expm1-log1p-u0.0
Final simplification0.0
herbie shell --seed 2019208 +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)))