\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2}\begin{array}{l}
\mathbf{if}\;x \cdot y \le -4.566826615749695196924573814616312015843 \cdot 10^{195}:\\
\;\;\;\;0.5 \cdot \left(\frac{x}{a} \cdot y\right) - 4.5 \cdot \frac{t \cdot z}{a}\\
\mathbf{elif}\;x \cdot y \le -1.409471842933517829629004567440056948219 \cdot 10^{-54}:\\
\;\;\;\;0.5 \cdot \frac{x \cdot y}{a} - \left(t \cdot 4.5\right) \cdot \frac{z}{a}\\
\mathbf{elif}\;x \cdot y \le -7.881150033831729975395028746011437642375 \cdot 10^{-181}:\\
\;\;\;\;\frac{x \cdot y - z \cdot \left(9 \cdot t\right)}{a \cdot 2}\\
\mathbf{elif}\;x \cdot y \le 7.171891915826975815362349199038023134459 \cdot 10^{232}:\\
\;\;\;\;0.5 \cdot \frac{x \cdot y}{a} - 4.5 \cdot \left(t \cdot \frac{z}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a}\right) - 4.5 \cdot \frac{t \cdot z}{a}\\
\end{array}double f(double x, double y, double z, double t, double a) {
double r465145 = x;
double r465146 = y;
double r465147 = r465145 * r465146;
double r465148 = z;
double r465149 = 9.0;
double r465150 = r465148 * r465149;
double r465151 = t;
double r465152 = r465150 * r465151;
double r465153 = r465147 - r465152;
double r465154 = a;
double r465155 = 2.0;
double r465156 = r465154 * r465155;
double r465157 = r465153 / r465156;
return r465157;
}
double f(double x, double y, double z, double t, double a) {
double r465158 = x;
double r465159 = y;
double r465160 = r465158 * r465159;
double r465161 = -4.566826615749695e+195;
bool r465162 = r465160 <= r465161;
double r465163 = 0.5;
double r465164 = a;
double r465165 = r465158 / r465164;
double r465166 = r465165 * r465159;
double r465167 = r465163 * r465166;
double r465168 = 4.5;
double r465169 = t;
double r465170 = z;
double r465171 = r465169 * r465170;
double r465172 = r465171 / r465164;
double r465173 = r465168 * r465172;
double r465174 = r465167 - r465173;
double r465175 = -1.4094718429335178e-54;
bool r465176 = r465160 <= r465175;
double r465177 = r465160 / r465164;
double r465178 = r465163 * r465177;
double r465179 = r465169 * r465168;
double r465180 = r465170 / r465164;
double r465181 = r465179 * r465180;
double r465182 = r465178 - r465181;
double r465183 = -7.88115003383173e-181;
bool r465184 = r465160 <= r465183;
double r465185 = 9.0;
double r465186 = r465185 * r465169;
double r465187 = r465170 * r465186;
double r465188 = r465160 - r465187;
double r465189 = 2.0;
double r465190 = r465164 * r465189;
double r465191 = r465188 / r465190;
double r465192 = 7.171891915826976e+232;
bool r465193 = r465160 <= r465192;
double r465194 = r465169 * r465180;
double r465195 = r465168 * r465194;
double r465196 = r465178 - r465195;
double r465197 = r465159 / r465164;
double r465198 = r465158 * r465197;
double r465199 = r465163 * r465198;
double r465200 = r465199 - r465173;
double r465201 = r465193 ? r465196 : r465200;
double r465202 = r465184 ? r465191 : r465201;
double r465203 = r465176 ? r465182 : r465202;
double r465204 = r465162 ? r465174 : r465203;
return r465204;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 7.7 |
|---|---|
| Target | 5.4 |
| Herbie | 5.1 |
if (* x y) < -4.566826615749695e+195Initial program 28.3
Taylor expanded around 0 28.3
rmApplied associate-/l*7.6
rmApplied associate-/r/7.0
if -4.566826615749695e+195 < (* x y) < -1.4094718429335178e-54Initial program 3.9
Taylor expanded around 0 3.9
rmApplied *-un-lft-identity3.9
Applied times-frac3.8
Applied associate-*r*3.8
Simplified3.8
if -1.4094718429335178e-54 < (* x y) < -7.88115003383173e-181Initial program 3.4
rmApplied associate-*l*3.4
if -7.88115003383173e-181 < (* x y) < 7.171891915826976e+232Initial program 4.2
Taylor expanded around 0 4.1
rmApplied *-un-lft-identity4.1
Applied times-frac5.5
Simplified5.5
if 7.171891915826976e+232 < (* x y) Initial program 36.4
Taylor expanded around 0 36.4
rmApplied *-un-lft-identity36.4
Applied times-frac5.7
Simplified5.7
Final simplification5.1
herbie shell --seed 2019322 +o rules:numerics
(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)))