\left(x \cdot y - z \cdot y\right) \cdot t
\begin{array}{l}
\mathbf{if}\;x \cdot y - z \cdot y \le -7.222093090430865854846214223753387413719 \cdot 10^{176} \lor \neg \left(x \cdot y - z \cdot y \le 5.372101420387125971810690231338819728234 \cdot 10^{161}\right):\\
\;\;\;\;\left(t \cdot y\right) \cdot \left(x - z\right)\\
\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 r617295 = x;
double r617296 = y;
double r617297 = r617295 * r617296;
double r617298 = z;
double r617299 = r617298 * r617296;
double r617300 = r617297 - r617299;
double r617301 = t;
double r617302 = r617300 * r617301;
return r617302;
}
double f(double x, double y, double z, double t) {
double r617303 = x;
double r617304 = y;
double r617305 = r617303 * r617304;
double r617306 = z;
double r617307 = r617306 * r617304;
double r617308 = r617305 - r617307;
double r617309 = -7.222093090430866e+176;
bool r617310 = r617308 <= r617309;
double r617311 = 5.372101420387126e+161;
bool r617312 = r617308 <= r617311;
double r617313 = !r617312;
bool r617314 = r617310 || r617313;
double r617315 = t;
double r617316 = r617315 * r617304;
double r617317 = r617303 - r617306;
double r617318 = r617316 * r617317;
double r617319 = r617308 * r617315;
double r617320 = r617314 ? r617318 : r617319;
return r617320;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 6.9 |
|---|---|
| Target | 2.9 |
| Herbie | 1.8 |
if (- (* x y) (* z y)) < -7.222093090430866e+176 or 5.372101420387126e+161 < (- (* x y) (* z y)) Initial program 22.7
rmApplied distribute-rgt-out--22.7
Applied associate-*l*1.7
Simplified1.7
rmApplied associate-*r*1.9
Simplified1.9
if -7.222093090430866e+176 < (- (* x y) (* z y)) < 5.372101420387126e+161Initial program 1.8
Final simplification1.8
herbie shell --seed 2019351 +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))