\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 r476684 = x;
double r476685 = y;
double r476686 = r476684 * r476685;
double r476687 = z;
double r476688 = r476687 * r476685;
double r476689 = r476686 - r476688;
double r476690 = t;
double r476691 = r476689 * r476690;
return r476691;
}
double f(double x, double y, double z, double t) {
double r476692 = x;
double r476693 = y;
double r476694 = r476692 * r476693;
double r476695 = z;
double r476696 = r476695 * r476693;
double r476697 = r476694 - r476696;
double r476698 = -4.638362680606878e+307;
bool r476699 = r476697 <= r476698;
double r476700 = 1.955474113061338e+248;
bool r476701 = r476697 <= r476700;
double r476702 = !r476701;
bool r476703 = r476699 || r476702;
double r476704 = r476692 - r476695;
double r476705 = t;
double r476706 = r476704 * r476705;
double r476707 = r476693 * r476706;
double r476708 = r476697 * r476705;
double r476709 = r476703 ? r476707 : r476708;
return r476709;
}




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))