\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 r319100 = x;
double r319101 = 2.0;
double r319102 = r319100 * r319101;
double r319103 = y;
double r319104 = r319102 * r319103;
double r319105 = r319100 - r319103;
double r319106 = r319104 / r319105;
return r319106;
}
double f(double x, double y) {
double r319107 = x;
double r319108 = y;
double r319109 = r319107 - r319108;
double r319110 = r319107 / r319109;
double r319111 = 2.0;
double r319112 = r319108 * r319111;
double r319113 = r319110 * r319112;
return r319113;
}




Bits error versus x




Bits error versus y
Results
| Original | 15.3 |
|---|---|
| Target | 0.4 |
| Herbie | 7.1 |
if x < -9.265176501060394e-08 or 1.3808383341677658e+61 < x Initial program 17.4
rmApplied associate-/l*15.8
rmApplied div-inv16.0
Applied times-frac0.2
Simplified0.1
if -9.265176501060394e-08 < x < 1.3808383341677658e+61Initial program 13.5
rmApplied associate-/l*0.3
rmApplied div-inv0.4
Simplified0.3
Final simplification7.1
herbie shell --seed 2019304
(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)))