\frac{x - y}{2 - \left(x + y\right)}\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{x - y}{2 - \left(y + x\right)}\right)\right)double f(double x, double y) {
double r38450500 = x;
double r38450501 = y;
double r38450502 = r38450500 - r38450501;
double r38450503 = 2.0;
double r38450504 = r38450500 + r38450501;
double r38450505 = r38450503 - r38450504;
double r38450506 = r38450502 / r38450505;
return r38450506;
}
double f(double x, double y) {
double r38450507 = x;
double r38450508 = y;
double r38450509 = r38450507 - r38450508;
double r38450510 = 2.0;
double r38450511 = r38450508 + r38450507;
double r38450512 = r38450510 - r38450511;
double r38450513 = r38450509 / r38450512;
double r38450514 = log1p(r38450513);
double r38450515 = expm1(r38450514);
return r38450515;
}




Bits error versus x




Bits error versus y
Results
| Original | 0.0 |
|---|---|
| Target | 0.0 |
| Herbie | 0.9 |
Initial program 0.0
rmApplied expm1-log1p-u0.9
Final simplification0.9
herbie shell --seed 2019192 +o rules:numerics
(FPCore (x y)
:name "Data.Colour.RGB:hslsv from colour-2.3.3, C"
:herbie-target
(- (/ x (- 2.0 (+ x y))) (/ y (- 2.0 (+ x y))))
(/ (- x y) (- 2.0 (+ x y))))