\frac{x + y}{x - y}\mathsf{log1p}\left(\mathsf{expm1}\left(\frac{1}{\frac{x - y}{x + y}}\right)\right)double f(double x, double y) {
double r799784 = x;
double r799785 = y;
double r799786 = r799784 + r799785;
double r799787 = r799784 - r799785;
double r799788 = r799786 / r799787;
return r799788;
}
double f(double x, double y) {
double r799789 = 1.0;
double r799790 = x;
double r799791 = y;
double r799792 = r799790 - r799791;
double r799793 = r799790 + r799791;
double r799794 = r799792 / r799793;
double r799795 = r799789 / r799794;
double r799796 = expm1(r799795);
double r799797 = log1p(r799796);
return r799797;
}




Bits error versus x




Bits error versus y
Results
| Original | 0.0 |
|---|---|
| Target | 0.0 |
| Herbie | 0.0 |
Initial program 0.0
rmApplied clear-num0.0
rmApplied log1p-expm1-u0.0
Final simplification0.0
herbie shell --seed 2020034 +o rules:numerics
(FPCore (x y)
:name "Linear.Projection:perspective from linear-1.19.1.3, A"
:precision binary64
:herbie-target
(/ 1 (- (/ x (+ x y)) (/ y (+ x y))))
(/ (+ x y) (- x y)))