\left(x \cdot y - z \cdot y\right) \cdot t
\begin{array}{l}
\mathbf{if}\;x \cdot y - z \cdot y = -\infty:\\
\;\;\;\;\left(t \cdot \left(x - z\right)\right) \cdot y\\
\mathbf{elif}\;x \cdot y - z \cdot y \le -9.28546639189079822726342632154485811791 \cdot 10^{-250}:\\
\;\;\;\;t \cdot \left(x \cdot y - z \cdot y\right)\\
\mathbf{elif}\;x \cdot y - z \cdot y \le 1.207146899072114501620361812179724065154 \cdot 10^{-243}:\\
\;\;\;\;\left(x - z\right) \cdot \left(y \cdot t\right)\\
\mathbf{elif}\;x \cdot y - z \cdot y \le 9.010117805898266714360417458543683393234 \cdot 10^{141}:\\
\;\;\;\;t \cdot \left(x \cdot y - z \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x - z\right) \cdot \left(y \cdot t\right)\\
\end{array}double f(double x, double y, double z, double t) {
double r20887821 = x;
double r20887822 = y;
double r20887823 = r20887821 * r20887822;
double r20887824 = z;
double r20887825 = r20887824 * r20887822;
double r20887826 = r20887823 - r20887825;
double r20887827 = t;
double r20887828 = r20887826 * r20887827;
return r20887828;
}
double f(double x, double y, double z, double t) {
double r20887829 = x;
double r20887830 = y;
double r20887831 = r20887829 * r20887830;
double r20887832 = z;
double r20887833 = r20887832 * r20887830;
double r20887834 = r20887831 - r20887833;
double r20887835 = -inf.0;
bool r20887836 = r20887834 <= r20887835;
double r20887837 = t;
double r20887838 = r20887829 - r20887832;
double r20887839 = r20887837 * r20887838;
double r20887840 = r20887839 * r20887830;
double r20887841 = -9.285466391890798e-250;
bool r20887842 = r20887834 <= r20887841;
double r20887843 = r20887837 * r20887834;
double r20887844 = 1.2071468990721145e-243;
bool r20887845 = r20887834 <= r20887844;
double r20887846 = r20887830 * r20887837;
double r20887847 = r20887838 * r20887846;
double r20887848 = 9.010117805898267e+141;
bool r20887849 = r20887834 <= r20887848;
double r20887850 = r20887849 ? r20887843 : r20887847;
double r20887851 = r20887845 ? r20887847 : r20887850;
double r20887852 = r20887842 ? r20887843 : r20887851;
double r20887853 = r20887836 ? r20887840 : r20887852;
return r20887853;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 7.4 |
|---|---|
| Target | 3.1 |
| Herbie | 0.5 |
if (- (* x y) (* z y)) < -inf.0Initial program 64.0
Simplified0.3
rmApplied associate-*r*0.2
if -inf.0 < (- (* x y) (* z y)) < -9.285466391890798e-250 or 1.2071468990721145e-243 < (- (* x y) (* z y)) < 9.010117805898267e+141Initial program 0.2
if -9.285466391890798e-250 < (- (* x y) (* z y)) < 1.2071468990721145e-243 or 9.010117805898267e+141 < (- (* x y) (* z y)) Initial program 18.2
Simplified1.2
Final simplification0.5
herbie shell --seed 2019179 +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))