\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 -3.3572243601805693 \cdot 10^{-45}:\\
\;\;\;\;\left(x - z\right) \cdot \left(t \cdot y\right)\\
\mathbf{elif}\;\left(x \cdot y - z \cdot y\right) \cdot t \le -0.0:\\
\;\;\;\;\left(\left(x - z\right) \cdot t\right) \cdot y\\
\mathbf{elif}\;\left(x \cdot y - z \cdot y\right) \cdot t \le 3.6377079460646548 \cdot 10^{+283}:\\
\;\;\;\;\left(x \cdot y - z \cdot y\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;\left(\left(x - z\right) \cdot t\right) \cdot y\\
\end{array}double f(double x, double y, double z, double t) {
double r23502271 = x;
double r23502272 = y;
double r23502273 = r23502271 * r23502272;
double r23502274 = z;
double r23502275 = r23502274 * r23502272;
double r23502276 = r23502273 - r23502275;
double r23502277 = t;
double r23502278 = r23502276 * r23502277;
return r23502278;
}
double f(double x, double y, double z, double t) {
double r23502279 = x;
double r23502280 = y;
double r23502281 = r23502279 * r23502280;
double r23502282 = z;
double r23502283 = r23502282 * r23502280;
double r23502284 = r23502281 - r23502283;
double r23502285 = t;
double r23502286 = r23502284 * r23502285;
double r23502287 = -3.3572243601805693e-45;
bool r23502288 = r23502286 <= r23502287;
double r23502289 = r23502279 - r23502282;
double r23502290 = r23502285 * r23502280;
double r23502291 = r23502289 * r23502290;
double r23502292 = -0.0;
bool r23502293 = r23502286 <= r23502292;
double r23502294 = r23502289 * r23502285;
double r23502295 = r23502294 * r23502280;
double r23502296 = 3.6377079460646548e+283;
bool r23502297 = r23502286 <= r23502296;
double r23502298 = r23502297 ? r23502286 : r23502295;
double r23502299 = r23502293 ? r23502295 : r23502298;
double r23502300 = r23502288 ? r23502291 : r23502299;
return r23502300;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 6.7 |
|---|---|
| Target | 3.0 |
| Herbie | 1.7 |
if (* (- (* x y) (* z y)) t) < -3.3572243601805693e-45Initial program 8.9
Simplified9.5
rmApplied associate-*l*2.0
if -3.3572243601805693e-45 < (* (- (* x y) (* z y)) t) < -0.0 or 3.6377079460646548e+283 < (* (- (* x y) (* z y)) t) Initial program 12.3
Simplified3.0
if -0.0 < (* (- (* x y) (* z y)) t) < 3.6377079460646548e+283Initial program 0.4
Final simplification1.7
herbie shell --seed 2019163 +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))