\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 r24150097 = x;
double r24150098 = y;
double r24150099 = r24150097 - r24150098;
double r24150100 = r24150097 + r24150098;
double r24150101 = r24150099 / r24150100;
return r24150101;
}
double f(double x, double y) {
double r24150102 = x;
double r24150103 = y;
double r24150104 = r24150103 + r24150102;
double r24150105 = r24150102 / r24150104;
double r24150106 = exp(r24150105);
double r24150107 = 1.0;
double r24150108 = r24150103 / r24150104;
double r24150109 = expm1(r24150108);
double r24150110 = r24150107 + r24150109;
double r24150111 = r24150106 / r24150110;
double r24150112 = log(r24150111);
return r24150112;
}




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