\left(x \cdot y - z \cdot y\right) \cdot t
\begin{array}{l}
\mathbf{if}\;y \le -1.726221282888553 \cdot 10^{+37}:\\
\;\;\;\;\left(\left(x - z\right) \cdot t\right) \cdot y\\
\mathbf{elif}\;y \le 1.0004031038538675 \cdot 10^{-14}:\\
\;\;\;\;\left(\left(x - z\right) \cdot y\right) \cdot t\\
\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 r22766362 = x;
double r22766363 = y;
double r22766364 = r22766362 * r22766363;
double r22766365 = z;
double r22766366 = r22766365 * r22766363;
double r22766367 = r22766364 - r22766366;
double r22766368 = t;
double r22766369 = r22766367 * r22766368;
return r22766369;
}
double f(double x, double y, double z, double t) {
double r22766370 = y;
double r22766371 = -1.726221282888553e+37;
bool r22766372 = r22766370 <= r22766371;
double r22766373 = x;
double r22766374 = z;
double r22766375 = r22766373 - r22766374;
double r22766376 = t;
double r22766377 = r22766375 * r22766376;
double r22766378 = r22766377 * r22766370;
double r22766379 = 1.0004031038538675e-14;
bool r22766380 = r22766370 <= r22766379;
double r22766381 = r22766375 * r22766370;
double r22766382 = r22766381 * r22766376;
double r22766383 = r22766370 * r22766376;
double r22766384 = r22766375 * r22766383;
double r22766385 = r22766380 ? r22766382 : r22766384;
double r22766386 = r22766372 ? r22766378 : r22766385;
return r22766386;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 6.8 |
|---|---|
| Target | 3.1 |
| Herbie | 2.9 |
if y < -1.726221282888553e+37Initial program 16.2
rmApplied distribute-rgt-out--16.2
Applied associate-*l*3.7
if -1.726221282888553e+37 < y < 1.0004031038538675e-14Initial program 2.3
rmApplied *-un-lft-identity2.3
Applied associate-*r*2.3
Simplified2.3
if 1.0004031038538675e-14 < y Initial program 13.4
rmApplied distribute-rgt-out--13.4
Applied associate-*l*3.5
Taylor expanded around inf 13.4
Simplified3.8
Final simplification2.9
herbie shell --seed 2019158 +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))