\frac{\left(x \cdot 2\right) \cdot y}{x - y}\left(x \cdot 2\right) \cdot \frac{y}{x - y}double f(double x, double y) {
double r403829 = x;
double r403830 = 2.0;
double r403831 = r403829 * r403830;
double r403832 = y;
double r403833 = r403831 * r403832;
double r403834 = r403829 - r403832;
double r403835 = r403833 / r403834;
return r403835;
}
double f(double x, double y) {
double r403836 = x;
double r403837 = 2.0;
double r403838 = r403836 * r403837;
double r403839 = y;
double r403840 = r403836 - r403839;
double r403841 = r403839 / r403840;
double r403842 = r403838 * r403841;
return r403842;
}




Bits error versus x




Bits error versus y
Results
| Original | 15.0 |
|---|---|
| Target | 0.3 |
| Herbie | 7.2 |
if y < -58561655122625.34Initial program 16.7
rmApplied *-un-lft-identity16.7
Applied times-frac0.1
Simplified0.1
if -58561655122625.34 < y < 9.150412211331254e-133Initial program 15.6
rmApplied associate-/l*17.2
rmApplied div-inv17.3
Applied times-frac0.2
Simplified0.0
if 9.150412211331254e-133 < y Initial program 13.3
rmApplied associate-/l*1.7
rmApplied div-sub1.7
Simplified1.7
Final simplification7.2
herbie shell --seed 2019308
(FPCore (x y)
:name "Linear.Projection:perspective from linear-1.19.1.3, B"
:precision binary64
:herbie-target
(if (< x -1.7210442634149447e81) (* (/ (* 2 x) (- x y)) y) (if (< x 83645045635564432) (/ (* x 2) (/ (- x y) y)) (* (/ (* 2 x) (- x y)) y)))
(/ (* (* x 2) y) (- x y)))