\frac{x - y}{x + y}\mathsf{log1p}\left(\mathsf{expm1}\left(\frac{x - y}{x + y}\right)\right)double f(double x, double y) {
double r804511 = x;
double r804512 = y;
double r804513 = r804511 - r804512;
double r804514 = r804511 + r804512;
double r804515 = r804513 / r804514;
return r804515;
}
double f(double x, double y) {
double r804516 = x;
double r804517 = y;
double r804518 = r804516 - r804517;
double r804519 = r804516 + r804517;
double r804520 = r804518 / r804519;
double r804521 = expm1(r804520);
double r804522 = log1p(r804521);
return r804522;
}




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