\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 r778392 = x;
double r778393 = y;
double r778394 = r778392 * r778393;
double r778395 = z;
double r778396 = 9.0;
double r778397 = r778395 * r778396;
double r778398 = t;
double r778399 = r778397 * r778398;
double r778400 = r778394 - r778399;
double r778401 = a;
double r778402 = 2.0;
double r778403 = r778401 * r778402;
double r778404 = r778400 / r778403;
return r778404;
}
double f(double x, double y, double z, double t, double a) {
double r778405 = x;
double r778406 = y;
double r778407 = r778405 * r778406;
double r778408 = z;
double r778409 = 9.0;
double r778410 = r778408 * r778409;
double r778411 = t;
double r778412 = r778410 * r778411;
double r778413 = r778407 - r778412;
double r778414 = -inf.0;
bool r778415 = r778413 <= r778414;
double r778416 = -1.5704655355728843e-101;
bool r778417 = r778413 <= r778416;
double r778418 = 1.4744031399106853e-267;
bool r778419 = r778413 <= r778418;
double r778420 = 6.212678920874578e+275;
bool r778421 = r778413 <= r778420;
double r778422 = !r778421;
bool r778423 = r778419 || r778422;
double r778424 = !r778423;
bool r778425 = r778417 || r778424;
double r778426 = !r778425;
bool r778427 = r778415 || r778426;
double r778428 = 0.5;
double r778429 = a;
double r778430 = r778429 / r778406;
double r778431 = r778405 / r778430;
double r778432 = r778428 * r778431;
double r778433 = 4.5;
double r778434 = r778433 * r778411;
double r778435 = r778408 / r778429;
double r778436 = r778434 * r778435;
double r778437 = r778432 - r778436;
double r778438 = r778407 / r778429;
double r778439 = r778428 * r778438;
double r778440 = r778411 * r778408;
double r778441 = r778440 / r778429;
double r778442 = r778433 * r778441;
double r778443 = r778439 - r778442;
double r778444 = r778427 ? r778437 : r778443;
return r778444;
}




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)))