\left(x \cdot y - z \cdot y\right) \cdot t
\begin{array}{l}
\mathbf{if}\;x \cdot y - z \cdot y \le -4.475560541981180625389373862309574765434 \cdot 10^{277} \lor \neg \left(x \cdot y - z \cdot y \le 1.775191623851220465574628585536100594199 \cdot 10^{264}\right):\\
\;\;\;\;y \cdot \left(\left(x - z\right) \cdot t\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 r350537 = x;
double r350538 = y;
double r350539 = r350537 * r350538;
double r350540 = z;
double r350541 = r350540 * r350538;
double r350542 = r350539 - r350541;
double r350543 = t;
double r350544 = r350542 * r350543;
return r350544;
}
double f(double x, double y, double z, double t) {
double r350545 = x;
double r350546 = y;
double r350547 = r350545 * r350546;
double r350548 = z;
double r350549 = r350548 * r350546;
double r350550 = r350547 - r350549;
double r350551 = -4.475560541981181e+277;
bool r350552 = r350550 <= r350551;
double r350553 = 1.7751916238512205e+264;
bool r350554 = r350550 <= r350553;
double r350555 = !r350554;
bool r350556 = r350552 || r350555;
double r350557 = r350545 - r350548;
double r350558 = t;
double r350559 = r350557 * r350558;
double r350560 = r350546 * r350559;
double r350561 = r350550 * r350558;
double r350562 = r350556 ? r350560 : r350561;
return r350562;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 7.5 |
|---|---|
| Target | 3.2 |
| Herbie | 1.5 |
if (- (* x y) (* z y)) < -4.475560541981181e+277 or 1.7751916238512205e+264 < (- (* x y) (* z y)) Initial program 47.2
rmApplied distribute-rgt-out--47.2
Applied associate-*l*0.2
if -4.475560541981181e+277 < (- (* x y) (* z y)) < 1.7751916238512205e+264Initial program 1.7
Final simplification1.5
herbie shell --seed 2019305
(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))