\frac{x - y}{x + y}\frac{x}{y + x} - \mathsf{expm1}\left(\mathsf{log1p}\left(\frac{y}{y + x}\right)\right)double f(double x, double y) {
double r41449688 = x;
double r41449689 = y;
double r41449690 = r41449688 - r41449689;
double r41449691 = r41449688 + r41449689;
double r41449692 = r41449690 / r41449691;
return r41449692;
}
double f(double x, double y) {
double r41449693 = x;
double r41449694 = y;
double r41449695 = r41449694 + r41449693;
double r41449696 = r41449693 / r41449695;
double r41449697 = r41449694 / r41449695;
double r41449698 = log1p(r41449697);
double r41449699 = expm1(r41449698);
double r41449700 = r41449696 - r41449699;
return r41449700;
}




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 expm1-log1p-u0.0
Final simplification0.0
herbie shell --seed 2019158 +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)))