\left(x \cdot y - z \cdot y\right) \cdot t
\begin{array}{l}
\mathbf{if}\;y \le -3.125987808896981841012203791423557065046 \cdot 10^{-142} \lor \neg \left(y \le 134279464056616382181146624\right):\\
\;\;\;\;y \cdot \left(\left(x - z\right) \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;\left(\left(x - z\right) \cdot y\right) \cdot t\\
\end{array}double f(double x, double y, double z, double t) {
double r309694 = x;
double r309695 = y;
double r309696 = r309694 * r309695;
double r309697 = z;
double r309698 = r309697 * r309695;
double r309699 = r309696 - r309698;
double r309700 = t;
double r309701 = r309699 * r309700;
return r309701;
}
double f(double x, double y, double z, double t) {
double r309702 = y;
double r309703 = -3.125987808896982e-142;
bool r309704 = r309702 <= r309703;
double r309705 = 1.3427946405661638e+26;
bool r309706 = r309702 <= r309705;
double r309707 = !r309706;
bool r309708 = r309704 || r309707;
double r309709 = x;
double r309710 = z;
double r309711 = r309709 - r309710;
double r309712 = t;
double r309713 = r309711 * r309712;
double r309714 = r309702 * r309713;
double r309715 = r309711 * r309702;
double r309716 = r309715 * r309712;
double r309717 = r309708 ? r309714 : r309716;
return r309717;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 7.0 |
|---|---|
| Target | 3.1 |
| Herbie | 3.0 |
if y < -3.125987808896982e-142 or 1.3427946405661638e+26 < y Initial program 11.8
Simplified11.8
rmApplied pow111.8
Applied pow111.8
Applied pow111.8
Applied pow-prod-down11.8
Applied pow-prod-down11.8
Simplified3.8
if -3.125987808896982e-142 < y < 1.3427946405661638e+26Initial program 2.1
Simplified2.1
rmApplied pow12.1
Applied pow12.1
Applied pow12.1
Applied pow-prod-down2.1
Applied pow-prod-down2.1
Simplified9.6
rmApplied add-cube-cbrt10.3
Applied associate-*r*10.3
Taylor expanded around inf 2.1
Simplified2.1
Final simplification3.0
herbie shell --seed 2019347 +o rules:numerics
(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))