\frac{x - y}{x + y}\mathsf{log1p}\left(\mathsf{expm1}\left(\frac{x}{y + x} - \frac{y}{y + x}\right)\right)double f(double x, double y) {
double r38639150 = x;
double r38639151 = y;
double r38639152 = r38639150 - r38639151;
double r38639153 = r38639150 + r38639151;
double r38639154 = r38639152 / r38639153;
return r38639154;
}
double f(double x, double y) {
double r38639155 = x;
double r38639156 = y;
double r38639157 = r38639156 + r38639155;
double r38639158 = r38639155 / r38639157;
double r38639159 = r38639156 / r38639157;
double r38639160 = r38639158 - r38639159;
double r38639161 = expm1(r38639160);
double r38639162 = log1p(r38639161);
return r38639162;
}




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
Final simplification0.0
herbie shell --seed 2019163 +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)))