\frac{x \cdot 2}{y \cdot z - t \cdot z}\frac{\frac{x}{\frac{y - t}{2}}}{z}double f(double x, double y, double z, double t) {
double r402321 = x;
double r402322 = 2.0;
double r402323 = r402321 * r402322;
double r402324 = y;
double r402325 = z;
double r402326 = r402324 * r402325;
double r402327 = t;
double r402328 = r402327 * r402325;
double r402329 = r402326 - r402328;
double r402330 = r402323 / r402329;
return r402330;
}
double f(double x, double y, double z, double t) {
double r402331 = x;
double r402332 = y;
double r402333 = t;
double r402334 = r402332 - r402333;
double r402335 = 2.0;
double r402336 = r402334 / r402335;
double r402337 = r402331 / r402336;
double r402338 = z;
double r402339 = r402337 / r402338;
return r402339;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 7.3 |
|---|---|
| Target | 2.2 |
| Herbie | 5.4 |
if z < -2.1961928853843444e-14Initial program 11.3
Simplified9.1
rmApplied *-un-lft-identity9.1
Applied times-frac9.1
Applied associate-/r*1.6
Simplified1.6
if -2.1961928853843444e-14 < z < 1.6092045793144405e-239Initial program 3.1
Simplified3.1
if 1.6092045793144405e-239 < z Initial program 7.3
Simplified6.0
rmApplied *-un-lft-identity6.0
Applied times-frac6.0
Applied *-un-lft-identity6.0
Applied times-frac4.1
Simplified4.1
rmApplied *-un-lft-identity4.1
Applied *-un-lft-identity4.1
Applied times-frac4.1
Applied associate-*l*4.1
Simplified4.0
Final simplification5.4
herbie shell --seed 2019297
(FPCore (x y z t)
:name "Linear.Projection:infinitePerspective from linear-1.19.1.3, A"
:precision binary64
:herbie-target
(if (< (/ (* x 2) (- (* y z) (* t z))) -2.559141628295061e-13) (* (/ x (* (- y t) z)) 2) (if (< (/ (* x 2) (- (* y z) (* t z))) 1.045027827330126e-269) (/ (* (/ x z) 2) (- y t)) (* (/ x (* (- y t) z)) 2)))
(/ (* x 2) (- (* y z) (* t z))))