\left(x \cdot y - z \cdot y\right) \cdot t
\begin{array}{l}
\mathbf{if}\;\left(x \cdot y - z \cdot y\right) \cdot t \le -6.90503745471781065 \cdot 10^{-4} \lor \neg \left(\left(x \cdot y - z \cdot y\right) \cdot t \le 7.0704745665399515 \cdot 10^{298}\right):\\
\;\;\;\;{\left(\left(t \cdot y\right) \cdot \left(x - z\right)\right)}^{1}\\
\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 r527703 = x;
double r527704 = y;
double r527705 = r527703 * r527704;
double r527706 = z;
double r527707 = r527706 * r527704;
double r527708 = r527705 - r527707;
double r527709 = t;
double r527710 = r527708 * r527709;
return r527710;
}
double f(double x, double y, double z, double t) {
double r527711 = x;
double r527712 = y;
double r527713 = r527711 * r527712;
double r527714 = z;
double r527715 = r527714 * r527712;
double r527716 = r527713 - r527715;
double r527717 = t;
double r527718 = r527716 * r527717;
double r527719 = -0.0006905037454717811;
bool r527720 = r527718 <= r527719;
double r527721 = 7.0704745665399515e+298;
bool r527722 = r527718 <= r527721;
double r527723 = !r527722;
bool r527724 = r527720 || r527723;
double r527725 = r527717 * r527712;
double r527726 = r527711 - r527714;
double r527727 = r527725 * r527726;
double r527728 = 1.0;
double r527729 = pow(r527727, r527728);
double r527730 = r527724 ? r527729 : r527718;
return r527730;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 7.2 |
|---|---|
| Target | 3.1 |
| Herbie | 2.0 |
if (* (- (* x y) (* z y)) t) < -0.0006905037454717811 or 7.0704745665399515e+298 < (* (- (* x y) (* z y)) t) Initial program 19.2
rmApplied pow119.2
Applied pow119.2
Applied pow-prod-down19.2
Simplified2.3
if -0.0006905037454717811 < (* (- (* x y) (* z y)) t) < 7.0704745665399515e+298Initial program 1.9
Final simplification2.0
herbie shell --seed 2020024 +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))