\left(x \cdot y - z \cdot y\right) \cdot t
\begin{array}{l}
\mathbf{if}\;y \le -1.8977022651582564 \cdot 10^{-63} \lor \neg \left(y \le 1.21955483733648284 \cdot 10^{-250}\right):\\
\;\;\;\;\left(t \cdot y\right) \cdot \left(x - z\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\sqrt[3]{t} \cdot \sqrt[3]{t}\right) \cdot \left(\sqrt[3]{t} \cdot \left(y \cdot \left(x - z\right)\right)\right)\\
\end{array}double code(double x, double y, double z, double t) {
return ((double) (((double) (((double) (x * y)) - ((double) (z * y)))) * t));
}
double code(double x, double y, double z, double t) {
double VAR;
if (((y <= -1.8977022651582564e-63) || !(y <= 1.2195548373364828e-250))) {
VAR = ((double) (((double) (t * y)) * ((double) (x - z))));
} else {
VAR = ((double) (((double) (((double) cbrt(t)) * ((double) cbrt(t)))) * ((double) (((double) cbrt(t)) * ((double) (y * ((double) (x - z))))))));
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 7.3 |
|---|---|
| Target | 3.2 |
| Herbie | 4.5 |
if y < -1.8977022651582564e-63 or 1.2195548373364828e-250 < y Initial program 9.1
Simplified9.1
rmApplied associate-*r*4.7
if -1.8977022651582564e-63 < y < 1.2195548373364828e-250Initial program 3.3
Simplified3.3
rmApplied add-cube-cbrt4.1
Applied associate-*l*4.1
Final simplification4.5
herbie shell --seed 2020122
(FPCore (x y z t)
:name "Linear.Projection:inverseInfinitePerspective from linear-1.19.1.3"
:precision binary64
:herbie-target
(if (< t -9.231879582886777e-80) (* (* y t) (- x z)) (if (< t 2.543067051564877e+83) (* y (* t (- x z))) (* (* y (- x z)) t)))
(* (- (* x y) (* z y)) t))