\left(x \cdot y - z \cdot y\right) \cdot t
\begin{array}{l}
\mathbf{if}\;x \cdot y - z \cdot y = -\infty:\\
\;\;\;\;\left(x - z\right) \cdot \left(y \cdot t\right)\\
\mathbf{elif}\;x \cdot y - z \cdot y \le 1.2122805582373037 \cdot 10^{+206}:\\
\;\;\;\;t \cdot \mathsf{fma}\left(x, y, -z \cdot y\right)\\
\mathbf{else}:\\
\;\;\;\;\left(t \cdot \left(x - z\right)\right) \cdot y\\
\end{array}double f(double x, double y, double z, double t) {
double r25389934 = x;
double r25389935 = y;
double r25389936 = r25389934 * r25389935;
double r25389937 = z;
double r25389938 = r25389937 * r25389935;
double r25389939 = r25389936 - r25389938;
double r25389940 = t;
double r25389941 = r25389939 * r25389940;
return r25389941;
}
double f(double x, double y, double z, double t) {
double r25389942 = x;
double r25389943 = y;
double r25389944 = r25389942 * r25389943;
double r25389945 = z;
double r25389946 = r25389945 * r25389943;
double r25389947 = r25389944 - r25389946;
double r25389948 = -inf.0;
bool r25389949 = r25389947 <= r25389948;
double r25389950 = r25389942 - r25389945;
double r25389951 = t;
double r25389952 = r25389943 * r25389951;
double r25389953 = r25389950 * r25389952;
double r25389954 = 1.2122805582373037e+206;
bool r25389955 = r25389947 <= r25389954;
double r25389956 = -r25389946;
double r25389957 = fma(r25389942, r25389943, r25389956);
double r25389958 = r25389951 * r25389957;
double r25389959 = r25389951 * r25389950;
double r25389960 = r25389959 * r25389943;
double r25389961 = r25389955 ? r25389958 : r25389960;
double r25389962 = r25389949 ? r25389953 : r25389961;
return r25389962;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
| Original | 7.0 |
|---|---|
| Target | 3.2 |
| Herbie | 1.4 |
if (- (* x y) (* z y)) < -inf.0Initial program 64.0
Simplified0.2
if -inf.0 < (- (* x y) (* z y)) < 1.2122805582373037e+206Initial program 1.5
rmApplied fma-neg1.5
if 1.2122805582373037e+206 < (- (* x y) (* z y)) Initial program 30.6
Simplified0.8
rmApplied associate-*r*0.9
Final simplification1.4
herbie shell --seed 2019165 +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))