\left(x \cdot y - z \cdot y\right) \cdot t
\begin{array}{l}
\mathbf{if}\;x \cdot y - z \cdot y \le -2.463499167606939085331656027995681059505 \cdot 10^{200} \lor \neg \left(x \cdot y - z \cdot y \le 6.777688716742269720248573286984588117237 \cdot 10^{235}\right):\\
\;\;\;\;y \cdot \left(t \cdot \left(x - z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot y - z \cdot y\right) \cdot t\\
\end{array}double f(double x, double y, double z, double t) {
double r356951 = x;
double r356952 = y;
double r356953 = r356951 * r356952;
double r356954 = z;
double r356955 = r356954 * r356952;
double r356956 = r356953 - r356955;
double r356957 = t;
double r356958 = r356956 * r356957;
return r356958;
}
double f(double x, double y, double z, double t) {
double r356959 = x;
double r356960 = y;
double r356961 = r356959 * r356960;
double r356962 = z;
double r356963 = r356962 * r356960;
double r356964 = r356961 - r356963;
double r356965 = -2.463499167606939e+200;
bool r356966 = r356964 <= r356965;
double r356967 = 6.77768871674227e+235;
bool r356968 = r356964 <= r356967;
double r356969 = !r356968;
bool r356970 = r356966 || r356969;
double r356971 = t;
double r356972 = r356959 - r356962;
double r356973 = r356971 * r356972;
double r356974 = r356960 * r356973;
double r356975 = r356964 * r356971;
double r356976 = r356970 ? r356974 : r356975;
return r356976;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 7.0 |
|---|---|
| Target | 3.2 |
| Herbie | 1.4 |
if (- (* x y) (* z y)) < -2.463499167606939e+200 or 6.77768871674227e+235 < (- (* x y) (* z y)) Initial program 32.1
rmApplied distribute-rgt-out--32.1
Applied associate-*l*0.8
Simplified0.8
if -2.463499167606939e+200 < (- (* x y) (* z y)) < 6.77768871674227e+235Initial program 1.5
rmApplied pow11.5
Final simplification1.4
herbie shell --seed 2019322
(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))