\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2}\begin{array}{l}
\mathbf{if}\;x \cdot y - \left(z \cdot 9\right) \cdot t = -\infty \lor \neg \left(x \cdot y - \left(z \cdot 9\right) \cdot t \le -1.570465535572884322699978790782884605691 \cdot 10^{-101} \lor \neg \left(x \cdot y - \left(z \cdot 9\right) \cdot t \le 1.47440313991068531415406912842436761104 \cdot 10^{-267} \lor \neg \left(x \cdot y - \left(z \cdot 9\right) \cdot t \le 6.212678920874577831195231744431104229608 \cdot 10^{275}\right)\right)\right):\\
\;\;\;\;0.5 \cdot \frac{x}{\frac{a}{y}} - \left(4.5 \cdot t\right) \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \frac{x \cdot y}{a} - 4.5 \cdot \frac{t \cdot z}{a}\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r717526 = x;
double r717527 = y;
double r717528 = r717526 * r717527;
double r717529 = z;
double r717530 = 9.0;
double r717531 = r717529 * r717530;
double r717532 = t;
double r717533 = r717531 * r717532;
double r717534 = r717528 - r717533;
double r717535 = a;
double r717536 = 2.0;
double r717537 = r717535 * r717536;
double r717538 = r717534 / r717537;
return r717538;
}
double f(double x, double y, double z, double t, double a) {
double r717539 = x;
double r717540 = y;
double r717541 = r717539 * r717540;
double r717542 = z;
double r717543 = 9.0;
double r717544 = r717542 * r717543;
double r717545 = t;
double r717546 = r717544 * r717545;
double r717547 = r717541 - r717546;
double r717548 = -inf.0;
bool r717549 = r717547 <= r717548;
double r717550 = -1.5704655355728843e-101;
bool r717551 = r717547 <= r717550;
double r717552 = 1.4744031399106853e-267;
bool r717553 = r717547 <= r717552;
double r717554 = 6.212678920874578e+275;
bool r717555 = r717547 <= r717554;
double r717556 = !r717555;
bool r717557 = r717553 || r717556;
double r717558 = !r717557;
bool r717559 = r717551 || r717558;
double r717560 = !r717559;
bool r717561 = r717549 || r717560;
double r717562 = 0.5;
double r717563 = a;
double r717564 = r717563 / r717540;
double r717565 = r717539 / r717564;
double r717566 = r717562 * r717565;
double r717567 = 4.5;
double r717568 = r717567 * r717545;
double r717569 = r717542 / r717563;
double r717570 = r717568 * r717569;
double r717571 = r717566 - r717570;
double r717572 = r717541 / r717563;
double r717573 = r717562 * r717572;
double r717574 = r717545 * r717542;
double r717575 = r717574 / r717563;
double r717576 = r717567 * r717575;
double r717577 = r717573 - r717576;
double r717578 = r717561 ? r717571 : r717577;
return r717578;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 7.9 |
|---|---|
| Target | 5.6 |
| Herbie | 0.5 |
if (- (* x y) (* (* z 9.0) t)) < -inf.0 or -1.5704655355728843e-101 < (- (* x y) (* (* z 9.0) t)) < 1.4744031399106853e-267 or 6.212678920874578e+275 < (- (* x y) (* (* z 9.0) t)) Initial program 33.8
Taylor expanded around 0 33.5
rmApplied *-un-lft-identity33.5
Applied times-frac19.0
Simplified19.0
rmApplied associate-*r*19.1
rmApplied associate-/l*1.3
if -inf.0 < (- (* x y) (* (* z 9.0) t)) < -1.5704655355728843e-101 or 1.4744031399106853e-267 < (- (* x y) (* (* z 9.0) t)) < 6.212678920874578e+275Initial program 0.3
Taylor expanded around 0 0.3
rmApplied *-un-lft-identity0.3
Applied times-frac5.4
Simplified5.4
rmApplied associate-*r*5.4
Taylor expanded around 0 0.3
Final simplification0.5
herbie shell --seed 2020001
(FPCore (x y z t a)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, I"
:precision binary64
:herbie-target
(if (< a -2.090464557976709e+86) (- (* 0.5 (/ (* y x) a)) (* 4.5 (/ t (/ a z)))) (if (< a 2.144030707833976e+99) (/ (- (* x y) (* z (* 9 t))) (* a 2)) (- (* (/ y a) (* x 0.5)) (* (/ t a) (* z 4.5)))))
(/ (- (* x y) (* (* z 9) t)) (* a 2)))