\left(x \cdot y - z \cdot y\right) \cdot t
\begin{array}{l}
\mathbf{if}\;x \cdot y - z \cdot y \le -3.05444158092502344 \cdot 10^{286}:\\
\;\;\;\;y \cdot \left(\left(x - z\right) \cdot t\right)\\
\mathbf{elif}\;x \cdot y - z \cdot y \le -3.3060018835558615 \cdot 10^{-175}:\\
\;\;\;\;\left(x \cdot y - z \cdot y\right) \cdot t\\
\mathbf{elif}\;x \cdot y - z \cdot y \le 1.4822 \cdot 10^{-323}:\\
\;\;\;\;\mathsf{log1p}\left(\mathsf{expm1}\left(\left(t \cdot y\right) \cdot \left(x - z\right)\right)\right)\\
\mathbf{elif}\;x \cdot y - z \cdot y \le 3.1817144735460404 \cdot 10^{282}:\\
\;\;\;\;\left(x \cdot y - z \cdot y\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(\left(x - z\right) \cdot t\right)\\
\end{array}double f(double x, double y, double z, double t) {
double r594501 = x;
double r594502 = y;
double r594503 = r594501 * r594502;
double r594504 = z;
double r594505 = r594504 * r594502;
double r594506 = r594503 - r594505;
double r594507 = t;
double r594508 = r594506 * r594507;
return r594508;
}
double f(double x, double y, double z, double t) {
double r594509 = x;
double r594510 = y;
double r594511 = r594509 * r594510;
double r594512 = z;
double r594513 = r594512 * r594510;
double r594514 = r594511 - r594513;
double r594515 = -3.0544415809250234e+286;
bool r594516 = r594514 <= r594515;
double r594517 = r594509 - r594512;
double r594518 = t;
double r594519 = r594517 * r594518;
double r594520 = r594510 * r594519;
double r594521 = -3.3060018835558615e-175;
bool r594522 = r594514 <= r594521;
double r594523 = r594514 * r594518;
double r594524 = 1.4821969375237e-323;
bool r594525 = r594514 <= r594524;
double r594526 = r594518 * r594510;
double r594527 = r594526 * r594517;
double r594528 = expm1(r594527);
double r594529 = log1p(r594528);
double r594530 = 3.1817144735460404e+282;
bool r594531 = r594514 <= r594530;
double r594532 = r594531 ? r594523 : r594520;
double r594533 = r594525 ? r594529 : r594532;
double r594534 = r594522 ? r594523 : r594533;
double r594535 = r594516 ? r594520 : r594534;
return r594535;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 7.2 |
|---|---|
| Target | 3.1 |
| Herbie | 0.8 |
if (- (* x y) (* z y)) < -3.0544415809250234e+286 or 3.1817144735460404e+282 < (- (* x y) (* z y)) Initial program 53.0
rmApplied distribute-rgt-out--53.0
Applied associate-*l*0.3
if -3.0544415809250234e+286 < (- (* x y) (* z y)) < -3.3060018835558615e-175 or 1.4821969375237e-323 < (- (* x y) (* z y)) < 3.1817144735460404e+282Initial program 0.3
if -3.3060018835558615e-175 < (- (* x y) (* z y)) < 1.4821969375237e-323Initial program 9.4
rmApplied add-cube-cbrt9.8
Applied associate-*l*9.8
Simplified9.8
rmApplied log1p-expm1-u13.7
Simplified4.9
Final simplification0.8
herbie shell --seed 2020042 +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))