\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2}\begin{array}{l}
\mathbf{if}\;\left(z \cdot 9\right) \cdot t = -\infty:\\
\;\;\;\;0.5 \cdot \frac{\frac{x}{a}}{\frac{1}{y}} - \left(t \cdot 4.5\right) \cdot \frac{z}{a}\\
\mathbf{elif}\;\left(z \cdot 9\right) \cdot t \le 0.0:\\
\;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a}\right) - 4.5 \cdot \frac{t \cdot z}{a}\\
\mathbf{elif}\;\left(z \cdot 9\right) \cdot t \le 3.861757416987853855034265396917964327938 \cdot 10^{208}:\\
\;\;\;\;\frac{x \cdot y - z \cdot \left(9 \cdot t\right)}{a \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \frac{x}{\frac{a}{y}} - t \cdot \left(4.5 \cdot \frac{z}{a}\right)\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r747672 = x;
double r747673 = y;
double r747674 = r747672 * r747673;
double r747675 = z;
double r747676 = 9.0;
double r747677 = r747675 * r747676;
double r747678 = t;
double r747679 = r747677 * r747678;
double r747680 = r747674 - r747679;
double r747681 = a;
double r747682 = 2.0;
double r747683 = r747681 * r747682;
double r747684 = r747680 / r747683;
return r747684;
}
double f(double x, double y, double z, double t, double a) {
double r747685 = z;
double r747686 = 9.0;
double r747687 = r747685 * r747686;
double r747688 = t;
double r747689 = r747687 * r747688;
double r747690 = -inf.0;
bool r747691 = r747689 <= r747690;
double r747692 = 0.5;
double r747693 = x;
double r747694 = a;
double r747695 = r747693 / r747694;
double r747696 = 1.0;
double r747697 = y;
double r747698 = r747696 / r747697;
double r747699 = r747695 / r747698;
double r747700 = r747692 * r747699;
double r747701 = 4.5;
double r747702 = r747688 * r747701;
double r747703 = r747685 / r747694;
double r747704 = r747702 * r747703;
double r747705 = r747700 - r747704;
double r747706 = 0.0;
bool r747707 = r747689 <= r747706;
double r747708 = r747697 / r747694;
double r747709 = r747693 * r747708;
double r747710 = r747692 * r747709;
double r747711 = r747688 * r747685;
double r747712 = r747711 / r747694;
double r747713 = r747701 * r747712;
double r747714 = r747710 - r747713;
double r747715 = 3.861757416987854e+208;
bool r747716 = r747689 <= r747715;
double r747717 = r747693 * r747697;
double r747718 = r747686 * r747688;
double r747719 = r747685 * r747718;
double r747720 = r747717 - r747719;
double r747721 = 2.0;
double r747722 = r747694 * r747721;
double r747723 = r747720 / r747722;
double r747724 = r747694 / r747697;
double r747725 = r747693 / r747724;
double r747726 = r747692 * r747725;
double r747727 = r747701 * r747703;
double r747728 = r747688 * r747727;
double r747729 = r747726 - r747728;
double r747730 = r747716 ? r747723 : r747729;
double r747731 = r747707 ? r747714 : r747730;
double r747732 = r747691 ? r747705 : r747731;
return r747732;
}




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 | 4.3 |
if (* (* z 9.0) t) < -inf.0Initial program 64.0
Taylor expanded around 0 63.0
rmApplied associate-/l*63.0
rmApplied *-un-lft-identity63.0
Applied times-frac0.3
Applied associate-*r*0.5
Simplified0.5
rmApplied div-inv0.5
Applied associate-/r*0.6
if -inf.0 < (* (* z 9.0) t) < 0.0Initial program 4.3
Taylor expanded around 0 4.2
rmApplied *-un-lft-identity4.2
Applied times-frac4.5
Simplified4.5
if 0.0 < (* (* z 9.0) t) < 3.861757416987854e+208Initial program 4.3
rmApplied associate-*l*4.3
if 3.861757416987854e+208 < (* (* z 9.0) t) Initial program 31.3
Taylor expanded around 0 30.8
rmApplied associate-/l*27.5
rmApplied *-un-lft-identity27.5
Applied times-frac1.1
Applied associate-*r*1.4
Simplified1.4
rmApplied associate-*l*1.1
Final simplification4.3
herbie shell --seed 2019350
(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)))