\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 r30115055 = x;
double r30115056 = y;
double r30115057 = r30115055 - r30115056;
double r30115058 = r30115055 + r30115056;
double r30115059 = r30115057 / r30115058;
return r30115059;
}
double f(double x, double y) {
double r30115060 = x;
double r30115061 = y;
double r30115062 = r30115061 + r30115060;
double r30115063 = r30115060 / r30115062;
double r30115064 = exp(r30115063);
double r30115065 = 1.0;
double r30115066 = r30115061 / r30115062;
double r30115067 = expm1(r30115066);
double r30115068 = r30115065 + r30115067;
double r30115069 = r30115064 / r30115068;
double r30115070 = log(r30115069);
return r30115070;
}




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