\left(x \cdot y - z \cdot y\right) \cdot t
\begin{array}{l}
\mathbf{if}\;x \cdot y - z \cdot y \le -3.289691432454229072694311781383736379418 \cdot 10^{212} \lor \neg \left(x \cdot y - z \cdot y \le 4.13635306835415679283981035434619120167 \cdot 10^{151}\right):\\
\;\;\;\;y \cdot \left(t \cdot \left(x - z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot y - z \cdot y\right) \cdot t\\
\end{array}double f(double x, double y, double z, double t) {
double r386750 = x;
double r386751 = y;
double r386752 = r386750 * r386751;
double r386753 = z;
double r386754 = r386753 * r386751;
double r386755 = r386752 - r386754;
double r386756 = t;
double r386757 = r386755 * r386756;
return r386757;
}
double f(double x, double y, double z, double t) {
double r386758 = x;
double r386759 = y;
double r386760 = r386758 * r386759;
double r386761 = z;
double r386762 = r386761 * r386759;
double r386763 = r386760 - r386762;
double r386764 = -3.289691432454229e+212;
bool r386765 = r386763 <= r386764;
double r386766 = 4.136353068354157e+151;
bool r386767 = r386763 <= r386766;
double r386768 = !r386767;
bool r386769 = r386765 || r386768;
double r386770 = t;
double r386771 = r386758 - r386761;
double r386772 = r386770 * r386771;
double r386773 = r386759 * r386772;
double r386774 = r386763 * r386770;
double r386775 = r386769 ? r386773 : r386774;
return r386775;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 7.3 |
|---|---|
| Target | 3.0 |
| Herbie | 1.6 |
if (- (* x y) (* z y)) < -3.289691432454229e+212 or 4.136353068354157e+151 < (- (* x y) (* z y)) Initial program 25.5
rmApplied distribute-rgt-out--25.5
Applied associate-*l*1.5
Simplified1.5
if -3.289691432454229e+212 < (- (* x y) (* z y)) < 4.136353068354157e+151Initial program 1.7
Final simplification1.6
herbie shell --seed 2019304
(FPCore (x y z t)
:name "Linear.Projection:inverseInfinitePerspective from linear-1.19.1.3"
:precision binary64
:herbie-target
(if (< t -9.2318795828867769e-80) (* (* y t) (- x z)) (if (< t 2.5430670515648771e83) (* y (* t (- x z))) (* (* y (- x z)) t)))
(* (- (* x y) (* z y)) t))