\frac{\left(x \cdot 2\right) \cdot y}{x - y}\frac{x}{x - y} \cdot \left(y \cdot 2\right)double f(double x, double y) {
double r341170 = x;
double r341171 = 2.0;
double r341172 = r341170 * r341171;
double r341173 = y;
double r341174 = r341172 * r341173;
double r341175 = r341170 - r341173;
double r341176 = r341174 / r341175;
return r341176;
}
double f(double x, double y) {
double r341177 = x;
double r341178 = y;
double r341179 = r341177 - r341178;
double r341180 = r341177 / r341179;
double r341181 = 2.0;
double r341182 = r341178 * r341181;
double r341183 = r341180 * r341182;
return r341183;
}




Bits error versus x




Bits error versus y
Results
| Original | 14.7 |
|---|---|
| Target | 0.3 |
| Herbie | 6.8 |
if x < -1037.4860351195955 or 2.7844692506363857e-21 < x Initial program 15.2
rmApplied associate-/l*15.3
rmApplied div-inv15.4
Applied times-frac0.2
Simplified0.1
if -1037.4860351195955 < x < 2.7844692506363857e-21Initial program 14.3
rmApplied associate-/l*0.0
Final simplification6.8
herbie shell --seed 2019291
(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)))