\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 r192061 = x;
double r192062 = y;
double r192063 = r192061 * r192062;
double r192064 = z;
double r192065 = r192064 * r192062;
double r192066 = r192063 - r192065;
double r192067 = t;
double r192068 = r192066 * r192067;
return r192068;
}
double f(double x, double y, double z, double t) {
double r192069 = x;
double r192070 = y;
double r192071 = r192069 * r192070;
double r192072 = z;
double r192073 = r192072 * r192070;
double r192074 = r192071 - r192073;
double r192075 = -3.0544415809250234e+286;
bool r192076 = r192074 <= r192075;
double r192077 = r192069 - r192072;
double r192078 = t;
double r192079 = r192077 * r192078;
double r192080 = r192070 * r192079;
double r192081 = -3.3060018835558615e-175;
bool r192082 = r192074 <= r192081;
double r192083 = r192074 * r192078;
double r192084 = 1.4821969375237e-323;
bool r192085 = r192074 <= r192084;
double r192086 = r192078 * r192070;
double r192087 = r192086 * r192077;
double r192088 = expm1(r192087);
double r192089 = log1p(r192088);
double r192090 = 3.1817144735460404e+282;
bool r192091 = r192074 <= r192090;
double r192092 = r192091 ? r192083 : r192080;
double r192093 = r192085 ? r192089 : r192092;
double r192094 = r192082 ? r192083 : r192093;
double r192095 = r192076 ? r192080 : r192094;
return r192095;
}




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))