\frac{\left(x \cdot 2\right) \cdot y}{x - y}x \cdot \left(2 \cdot \frac{y}{x - y}\right)double f(double x, double y) {
double r455650 = x;
double r455651 = 2.0;
double r455652 = r455650 * r455651;
double r455653 = y;
double r455654 = r455652 * r455653;
double r455655 = r455650 - r455653;
double r455656 = r455654 / r455655;
return r455656;
}
double f(double x, double y) {
double r455657 = x;
double r455658 = 2.0;
double r455659 = y;
double r455660 = r455657 - r455659;
double r455661 = r455659 / r455660;
double r455662 = r455658 * r455661;
double r455663 = r455657 * r455662;
return r455663;
}




Bits error versus x




Bits error versus y
Results
| Original | 14.9 |
|---|---|
| Target | 0.3 |
| Herbie | 7.0 |
if y < -1.3041135359922132e-54Initial program 14.2
rmApplied *-un-lft-identity14.2
Applied times-frac0.4
Simplified0.4
rmApplied associate-*l*0.3
if -1.3041135359922132e-54 < y < 1.6669026246870463e-40Initial program 15.2
rmApplied associate-/l*17.2
rmApplied div-inv17.4
Applied times-frac0.2
Simplified0.0
if 1.6669026246870463e-40 < y Initial program 15.2
rmApplied associate-/l*0.2
rmApplied *-un-lft-identity0.2
Applied *-un-lft-identity0.2
Applied times-frac0.2
Simplified0.2
Simplified0.2
Final simplification7.0
herbie shell --seed 2019294
(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)))