\frac{x + y}{x - y}\mathsf{log1p}\left(\mathsf{expm1}\left(\frac{y + x}{x - y}\right)\right)double f(double x, double y) {
double r22085977 = x;
double r22085978 = y;
double r22085979 = r22085977 + r22085978;
double r22085980 = r22085977 - r22085978;
double r22085981 = r22085979 / r22085980;
return r22085981;
}
double f(double x, double y) {
double r22085982 = y;
double r22085983 = x;
double r22085984 = r22085982 + r22085983;
double r22085985 = r22085983 - r22085982;
double r22085986 = r22085984 / r22085985;
double r22085987 = expm1(r22085986);
double r22085988 = log1p(r22085987);
return r22085988;
}




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