\frac{x - y}{x + y}\log \left(\frac{e^{\frac{x}{y + x}}}{1 + \mathsf{expm1}\left(\frac{y}{y + x}\right)}\right)double f(double x, double y) {
double r33926448 = x;
double r33926449 = y;
double r33926450 = r33926448 - r33926449;
double r33926451 = r33926448 + r33926449;
double r33926452 = r33926450 / r33926451;
return r33926452;
}
double f(double x, double y) {
double r33926453 = x;
double r33926454 = y;
double r33926455 = r33926454 + r33926453;
double r33926456 = r33926453 / r33926455;
double r33926457 = exp(r33926456);
double r33926458 = 1.0;
double r33926459 = r33926454 / r33926455;
double r33926460 = expm1(r33926459);
double r33926461 = r33926458 + r33926460;
double r33926462 = r33926457 / r33926461;
double r33926463 = log(r33926462);
return r33926463;
}




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
rmApplied log1p-udef0.0
Applied add-log-exp0.0
Applied diff-log0.0
Final simplification0.0
herbie shell --seed 2019172 +o rules:numerics
(FPCore (x y)
:name "Data.Colour.RGB:hslsv from colour-2.3.3, D"
:herbie-target
(- (/ x (+ x y)) (/ y (+ x y)))
(/ (- x y) (+ x y)))