\left(x \cdot y - z \cdot y\right) \cdot t
\begin{array}{l}
\mathbf{if}\;x \cdot y - z \cdot y \le -4.910837465558025 \cdot 10^{+303}:\\
\;\;\;\;\left(x - z\right) \cdot \left(y \cdot t\right)\\
\mathbf{elif}\;x \cdot y - z \cdot y \le 3.08349659668913 \cdot 10^{+191}:\\
\;\;\;\;t \cdot \left(x \cdot y - z \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;\left(t \cdot \left(x - z\right)\right) \cdot y\\
\end{array}double f(double x, double y, double z, double t) {
double r22118814 = x;
double r22118815 = y;
double r22118816 = r22118814 * r22118815;
double r22118817 = z;
double r22118818 = r22118817 * r22118815;
double r22118819 = r22118816 - r22118818;
double r22118820 = t;
double r22118821 = r22118819 * r22118820;
return r22118821;
}
double f(double x, double y, double z, double t) {
double r22118822 = x;
double r22118823 = y;
double r22118824 = r22118822 * r22118823;
double r22118825 = z;
double r22118826 = r22118825 * r22118823;
double r22118827 = r22118824 - r22118826;
double r22118828 = -4.910837465558025e+303;
bool r22118829 = r22118827 <= r22118828;
double r22118830 = r22118822 - r22118825;
double r22118831 = t;
double r22118832 = r22118823 * r22118831;
double r22118833 = r22118830 * r22118832;
double r22118834 = 3.08349659668913e+191;
bool r22118835 = r22118827 <= r22118834;
double r22118836 = r22118831 * r22118827;
double r22118837 = r22118831 * r22118830;
double r22118838 = r22118837 * r22118823;
double r22118839 = r22118835 ? r22118836 : r22118838;
double r22118840 = r22118829 ? r22118833 : r22118839;
return r22118840;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 6.5 |
|---|---|
| Target | 3.0 |
| Herbie | 1.5 |
if (- (* x y) (* z y)) < -4.910837465558025e+303Initial program 56.8
Taylor expanded around inf 56.8
Simplified0.3
if -4.910837465558025e+303 < (- (* x y) (* z y)) < 3.08349659668913e+191Initial program 1.6
if 3.08349659668913e+191 < (- (* x y) (* z y)) Initial program 26.1
rmApplied distribute-rgt-out--26.0
Applied associate-*l*1.4
Final simplification1.5
herbie shell --seed 2019162 +o rules:numerics
(FPCore (x y z t)
:name "Linear.Projection:inverseInfinitePerspective from linear-1.19.1.3"
: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))