\left(x \cdot y - z \cdot y\right) \cdot t
\begin{array}{l}
\mathbf{if}\;y \le -4.049647329143563 \cdot 10^{27} \lor \neg \left(y \le 1.1333992022375297 \cdot 10^{48}\right):\\
\;\;\;\;\left(x - z\right) \cdot \left(t \cdot y\right) + \left(y \cdot \mathsf{fma}\left(-z, 1, z\right)\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot \left(x - z\right)\right) \cdot t + \left(y \cdot \mathsf{fma}\left(-z, 1, z\right)\right) \cdot t\\
\end{array}double f(double x, double y, double z, double t) {
double r635487 = x;
double r635488 = y;
double r635489 = r635487 * r635488;
double r635490 = z;
double r635491 = r635490 * r635488;
double r635492 = r635489 - r635491;
double r635493 = t;
double r635494 = r635492 * r635493;
return r635494;
}
double f(double x, double y, double z, double t) {
double r635495 = y;
double r635496 = -4.049647329143563e+27;
bool r635497 = r635495 <= r635496;
double r635498 = 1.1333992022375297e+48;
bool r635499 = r635495 <= r635498;
double r635500 = !r635499;
bool r635501 = r635497 || r635500;
double r635502 = x;
double r635503 = z;
double r635504 = r635502 - r635503;
double r635505 = t;
double r635506 = r635505 * r635495;
double r635507 = r635504 * r635506;
double r635508 = -r635503;
double r635509 = 1.0;
double r635510 = fma(r635508, r635509, r635503);
double r635511 = r635495 * r635510;
double r635512 = r635511 * r635505;
double r635513 = r635507 + r635512;
double r635514 = r635495 * r635504;
double r635515 = r635514 * r635505;
double r635516 = r635515 + r635512;
double r635517 = r635501 ? r635513 : r635516;
return r635517;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
| Original | 6.9 |
|---|---|
| Target | 2.9 |
| Herbie | 3.0 |
if y < -4.049647329143563e+27 or 1.1333992022375297e+48 < y Initial program 17.2
Simplified17.2
rmApplied add-cube-cbrt17.6
Applied add-sqr-sqrt40.9
Applied prod-diff40.9
Applied distribute-lft-in40.9
Applied distribute-lft-in40.9
Simplified12.7
Simplified4.4
if -4.049647329143563e+27 < y < 1.1333992022375297e+48Initial program 2.3
Simplified2.3
rmApplied add-cube-cbrt2.8
Applied add-sqr-sqrt34.2
Applied prod-diff34.2
Applied distribute-lft-in34.2
Applied distribute-lft-in34.2
Simplified7.6
Simplified7.5
rmApplied add-cube-cbrt8.2
Applied associate-*l*8.2
Taylor expanded around inf 2.3
Simplified2.3
Final simplification3.0
herbie shell --seed 2020057 +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))