\left(x \cdot y - z \cdot y\right) \cdot t
\begin{array}{l}
\mathbf{if}\;y \leq -10.53972593920637:\\
\;\;\;\;\left(y \cdot t\right) \cdot \left(x - z\right)\\
\mathbf{elif}\;y \leq 5.665083954679196 \cdot 10^{-72}:\\
\;\;\;\;t \cdot \left(y \cdot \left(x - z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(t \cdot x\right) - y \cdot \left(t \cdot z\right)\\
\end{array}(FPCore (x y z t) :precision binary64 (* (- (* x y) (* z y)) t))
(FPCore (x y z t)
:precision binary64
(if (<= y -10.53972593920637)
(* (* y t) (- x z))
(if (<= y 5.665083954679196e-72)
(* t (* y (- x z)))
(- (* y (* t x)) (* y (* t z))))))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 tmp;
if ((y <= -10.53972593920637)) {
tmp = ((double) (((double) (y * t)) * ((double) (x - z))));
} else {
double tmp_1;
if ((y <= 5.665083954679196e-72)) {
tmp_1 = ((double) (t * ((double) (y * ((double) (x - z))))));
} else {
tmp_1 = ((double) (((double) (y * ((double) (t * x)))) - ((double) (y * ((double) (t * z))))));
}
tmp = tmp_1;
}
return tmp;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 7.0 |
|---|---|
| Target | 3.0 |
| Herbie | 2.7 |
if y < -10.53972593920637Initial program Error: 15.4 bits
SimplifiedError: 3.0 bits
rmApplied associate-*r*Error: 3.5 bits
if -10.53972593920637 < y < 5.6650839546791963e-72Initial program Error: 2.2 bits
rmApplied *-un-lft-identityError: 2.2 bits
Applied associate-*r*Error: 2.2 bits
SimplifiedError: 2.2 bits
if 5.6650839546791963e-72 < y Initial program Error: 11.0 bits
SimplifiedError: 3.2 bits
rmApplied sub-negError: 3.2 bits
Applied distribute-lft-inError: 3.2 bits
Applied distribute-lft-inError: 3.1 bits
Final simplificationError: 2.7 bits
herbie shell --seed 2020203
(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))