\left(x \cdot y - z \cdot y\right) \cdot t
\begin{array}{l}
\mathbf{if}\;x \cdot y - z \cdot y \le -4.63836268060687826 \cdot 10^{307} \lor \neg \left(x \cdot y - z \cdot y \le 1.95547411306134 \cdot 10^{248}\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 r504689 = x;
double r504690 = y;
double r504691 = r504689 * r504690;
double r504692 = z;
double r504693 = r504692 * r504690;
double r504694 = r504691 - r504693;
double r504695 = t;
double r504696 = r504694 * r504695;
return r504696;
}
double f(double x, double y, double z, double t) {
double r504697 = x;
double r504698 = y;
double r504699 = r504697 * r504698;
double r504700 = z;
double r504701 = r504700 * r504698;
double r504702 = r504699 - r504701;
double r504703 = -4.638362680606878e+307;
bool r504704 = r504702 <= r504703;
double r504705 = 1.955474113061338e+248;
bool r504706 = r504702 <= r504705;
double r504707 = !r504706;
bool r504708 = r504704 || r504707;
double r504709 = r504697 - r504700;
double r504710 = t;
double r504711 = r504709 * r504710;
double r504712 = r504698 * r504711;
double r504713 = r504702 * r504710;
double r504714 = r504708 ? r504712 : r504713;
return r504714;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 6.8 |
|---|---|
| Target | 3.1 |
| Herbie | 1.4 |
if (- (* x y) (* z y)) < -4.638362680606878e+307 or 1.955474113061338e+248 < (- (* x y) (* z y)) Initial program 47.9
rmApplied distribute-rgt-out--47.9
Applied associate-*l*0.3
if -4.638362680606878e+307 < (- (* x y) (* z y)) < 1.955474113061338e+248Initial program 1.6
Final simplification1.4
herbie shell --seed 2020062
(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))