\frac{x + y}{x - y}\log \left(e^{\frac{y}{x - y} + \frac{x}{x - y}}\right)double f(double x, double y) {
double r25032810 = x;
double r25032811 = y;
double r25032812 = r25032810 + r25032811;
double r25032813 = r25032810 - r25032811;
double r25032814 = r25032812 / r25032813;
return r25032814;
}
double f(double x, double y) {
double r25032815 = y;
double r25032816 = x;
double r25032817 = r25032816 - r25032815;
double r25032818 = r25032815 / r25032817;
double r25032819 = r25032816 / r25032817;
double r25032820 = r25032818 + r25032819;
double r25032821 = exp(r25032820);
double r25032822 = log(r25032821);
return r25032822;
}




Bits error versus x




Bits error versus y
Results
| Original | 0.0 |
|---|---|
| Target | 0.0 |
| Herbie | 0.0 |
Initial program 0.0
rmApplied flip--31.0
Applied associate-/r/31.1
Simplified0.2
rmApplied distribute-lft-in0.2
rmApplied add-log-exp0.2
Applied add-log-exp0.1
Applied sum-log0.1
Simplified0.0
Final simplification0.0
herbie shell --seed 2019192 +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)))