\frac{x + y}{x - y}\frac{\frac{1}{x - y}}{\frac{1}{x + y}}double f(double x, double y) {
double r479634 = x;
double r479635 = y;
double r479636 = r479634 + r479635;
double r479637 = r479634 - r479635;
double r479638 = r479636 / r479637;
return r479638;
}
double f(double x, double y) {
double r479639 = 1.0;
double r479640 = x;
double r479641 = y;
double r479642 = r479640 - r479641;
double r479643 = r479639 / r479642;
double r479644 = r479640 + r479641;
double r479645 = r479639 / r479644;
double r479646 = r479643 / r479645;
return r479646;
}




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 div-inv0.2
Applied associate-/r*0.0
Final simplification0.0
herbie shell --seed 2020036
(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)))