\frac{x \cdot 2}{y \cdot z - t \cdot z}\frac{x}{z \cdot \frac{y - t}{2}}double f(double x, double y, double z, double t) {
double r399249 = x;
double r399250 = 2.0;
double r399251 = r399249 * r399250;
double r399252 = y;
double r399253 = z;
double r399254 = r399252 * r399253;
double r399255 = t;
double r399256 = r399255 * r399253;
double r399257 = r399254 - r399256;
double r399258 = r399251 / r399257;
return r399258;
}
double f(double x, double y, double z, double t) {
double r399259 = x;
double r399260 = z;
double r399261 = y;
double r399262 = t;
double r399263 = r399261 - r399262;
double r399264 = 2.0;
double r399265 = r399263 / r399264;
double r399266 = r399260 * r399265;
double r399267 = r399259 / r399266;
return r399267;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 6.8 |
|---|---|
| Target | 2.1 |
| Herbie | 5.6 |
if z < -4.549970434470263e+96Initial program 13.3
Simplified10.4
rmApplied *-un-lft-identity10.4
Applied times-frac10.4
Applied associate-/r*2.3
Simplified2.3
if -4.549970434470263e+96 < z < 6.435280610456954e-63Initial program 2.6
Simplified2.6
rmApplied *-un-lft-identity2.6
Applied times-frac2.6
Simplified2.6
if 6.435280610456954e-63 < z Initial program 9.1
Simplified7.2
rmApplied *-un-lft-identity7.2
Applied times-frac7.2
Applied *-un-lft-identity7.2
Applied times-frac1.9
Simplified1.9
rmApplied associate-*l/1.8
Simplified1.8
Final simplification5.6
herbie shell --seed 1978988140
(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))))