\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 r23341804 = x;
double r23341805 = y;
double r23341806 = r23341804 + r23341805;
double r23341807 = r23341804 - r23341805;
double r23341808 = r23341806 / r23341807;
return r23341808;
}
double f(double x, double y) {
double r23341809 = x;
double r23341810 = y;
double r23341811 = r23341809 + r23341810;
double r23341812 = r23341809 - r23341810;
double r23341813 = r23341811 / r23341812;
double r23341814 = expm1(r23341813);
double r23341815 = log1p(r23341814);
return r23341815;
}




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
Simplified0.0
Final simplification0.0
herbie shell --seed 2019168 +o rules:numerics
(FPCore (x y)
:name "Linear.Projection:perspective from linear-1.19.1.3, A"
:herbie-target
(/ 1.0 (- (/ x (+ x y)) (/ y (+ x y))))
(/ (+ x y) (- x y)))