\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 r341568 = x;
double r341569 = y;
double r341570 = r341568 * r341569;
double r341571 = z;
double r341572 = r341571 * r341569;
double r341573 = r341570 - r341572;
double r341574 = t;
double r341575 = r341573 * r341574;
return r341575;
}
double f(double x, double y, double z, double t) {
double r341576 = x;
double r341577 = y;
double r341578 = r341576 * r341577;
double r341579 = z;
double r341580 = r341579 * r341577;
double r341581 = r341578 - r341580;
double r341582 = -3.289691432454229e+212;
bool r341583 = r341581 <= r341582;
double r341584 = 4.136353068354157e+151;
bool r341585 = r341581 <= r341584;
double r341586 = !r341585;
bool r341587 = r341583 || r341586;
double r341588 = t;
double r341589 = r341576 - r341579;
double r341590 = r341588 * r341589;
double r341591 = r341577 * r341590;
double r341592 = r341581 * r341588;
double r341593 = r341587 ? r341591 : r341592;
return r341593;
}




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 +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.2318795828867769e-80) (* (* y t) (- x z)) (if (< t 2.5430670515648771e83) (* y (* t (- x z))) (* (* y (- x z)) t)))
(* (- (* x y) (* z y)) t))