\frac{x - y}{x + y}\log \left(1 + \mathsf{expm1}\left(\frac{x - y}{x + y}\right)\right)double f(double x, double y) {
double r819203 = x;
double r819204 = y;
double r819205 = r819203 - r819204;
double r819206 = r819203 + r819204;
double r819207 = r819205 / r819206;
return r819207;
}
double f(double x, double y) {
double r819208 = 1.0;
double r819209 = x;
double r819210 = y;
double r819211 = r819209 - r819210;
double r819212 = r819209 + r819210;
double r819213 = r819211 / r819212;
double r819214 = expm1(r819213);
double r819215 = r819208 + r819214;
double r819216 = log(r819215);
return r819216;
}




Bits error versus x




Bits error versus y
Results
| Original | 0.0 |
|---|---|
| Target | 0.0 |
| Herbie | 0.0 |
Initial program 0.0
rmApplied log1p-expm1-u0.0
rmApplied log1p-udef0.0
Final simplification0.0
herbie shell --seed 2020024 +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)))