\left(x \cdot y - z \cdot y\right) \cdot t
\begin{array}{l}
\mathbf{if}\;x \cdot y - z \cdot y \le -1.408609285106859205265187205065954549148 \cdot 10^{267} \lor \neg \left(x \cdot y - z \cdot y \le 5.703077828099037508205732225249978792094 \cdot 10^{266}\right):\\
\;\;\;\;y \cdot \left(\left(x - z\right) \cdot t\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 r473103 = x;
double r473104 = y;
double r473105 = r473103 * r473104;
double r473106 = z;
double r473107 = r473106 * r473104;
double r473108 = r473105 - r473107;
double r473109 = t;
double r473110 = r473108 * r473109;
return r473110;
}
double f(double x, double y, double z, double t) {
double r473111 = x;
double r473112 = y;
double r473113 = r473111 * r473112;
double r473114 = z;
double r473115 = r473114 * r473112;
double r473116 = r473113 - r473115;
double r473117 = -1.4086092851068592e+267;
bool r473118 = r473116 <= r473117;
double r473119 = 5.703077828099038e+266;
bool r473120 = r473116 <= r473119;
double r473121 = !r473120;
bool r473122 = r473118 || r473121;
double r473123 = r473111 - r473114;
double r473124 = t;
double r473125 = r473123 * r473124;
double r473126 = r473112 * r473125;
double r473127 = r473116 * r473124;
double r473128 = r473122 ? r473126 : r473127;
return r473128;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 7.3 |
|---|---|
| Target | 3.2 |
| Herbie | 1.3 |
if (- (* x y) (* z y)) < -1.4086092851068592e+267 or 5.703077828099038e+266 < (- (* x y) (* z y)) Initial program 46.9
rmApplied distribute-rgt-out--46.9
Applied associate-*l*0.3
if -1.4086092851068592e+267 < (- (* x y) (* z y)) < 5.703077828099038e+266Initial program 1.5
Final simplification1.3
herbie shell --seed 2019235
(FPCore (x y z t)
:name "Linear.Projection:inverseInfinitePerspective from linear-1.19.1.3"
:precision binary64
:herbie-target
(if (< t -9.2318795828867769e-80) (* (* y t) (- x z)) (if (< t 2.5430670515648771e83) (* y (* t (- x z))) (* (* y (- x z)) t)))
(* (- (* x y) (* z y)) t))