\left(x \cdot y - z \cdot y\right) \cdot t
\begin{array}{l}
\mathbf{if}\;\left(x \cdot y - z \cdot y\right) \cdot t = -\infty \lor \neg \left(\left(x \cdot y - z \cdot y\right) \cdot t \le -1.53044964204086178 \cdot 10^{-264} \lor \neg \left(\left(x \cdot y - z \cdot y\right) \cdot t \le 1.2292279533141836 \cdot 10^{-203} \lor \neg \left(\left(x \cdot y - z \cdot y\right) \cdot t \le 2.66626022737372574 \cdot 10^{305}\right)\right)\right):\\
\;\;\;\;y \cdot \left(\left(x - z\right) \cdot t\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot y + \left(-z \cdot y\right)\right) \cdot t\\
\end{array}double f(double x, double y, double z, double t) {
double r532484 = x;
double r532485 = y;
double r532486 = r532484 * r532485;
double r532487 = z;
double r532488 = r532487 * r532485;
double r532489 = r532486 - r532488;
double r532490 = t;
double r532491 = r532489 * r532490;
return r532491;
}
double f(double x, double y, double z, double t) {
double r532492 = x;
double r532493 = y;
double r532494 = r532492 * r532493;
double r532495 = z;
double r532496 = r532495 * r532493;
double r532497 = r532494 - r532496;
double r532498 = t;
double r532499 = r532497 * r532498;
double r532500 = -inf.0;
bool r532501 = r532499 <= r532500;
double r532502 = -1.5304496420408618e-264;
bool r532503 = r532499 <= r532502;
double r532504 = 1.2292279533141836e-203;
bool r532505 = r532499 <= r532504;
double r532506 = 2.6662602273737257e+305;
bool r532507 = r532499 <= r532506;
double r532508 = !r532507;
bool r532509 = r532505 || r532508;
double r532510 = !r532509;
bool r532511 = r532503 || r532510;
double r532512 = !r532511;
bool r532513 = r532501 || r532512;
double r532514 = r532492 - r532495;
double r532515 = r532514 * r532498;
double r532516 = r532493 * r532515;
double r532517 = -r532496;
double r532518 = r532494 + r532517;
double r532519 = r532518 * r532498;
double r532520 = r532513 ? r532516 : r532519;
return r532520;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 6.8 |
|---|---|
| Target | 3.2 |
| Herbie | 0.7 |
if (* (- (* x y) (* z y)) t) < -inf.0 or -1.5304496420408618e-264 < (* (- (* x y) (* z y)) t) < 1.2292279533141836e-203 or 2.6662602273737257e+305 < (* (- (* x y) (* z y)) t) Initial program 24.6
rmApplied distribute-rgt-out--24.6
Applied associate-*l*1.7
if -inf.0 < (* (- (* x y) (* z y)) t) < -1.5304496420408618e-264 or 1.2292279533141836e-203 < (* (- (* x y) (* z y)) t) < 2.6662602273737257e+305Initial program 0.4
rmApplied sub-neg0.4
Final simplification0.7
herbie shell --seed 2020064
(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))