\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}\begin{array}{l}
\mathbf{if}\;z \cdot 3 \le -1.5357642338074745 \cdot 10^{112}:\\
\;\;\;\;\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{{\left(3 \cdot \left(z \cdot y\right)\right)}^{1}}\\
\mathbf{elif}\;z \cdot 3 \le 1.3948728084198543 \cdot 10^{77}:\\
\;\;\;\;\left(x - \frac{1}{z} \cdot \frac{y}{3}\right) + \frac{1}{z} \cdot \frac{\frac{t}{3}}{y}\\
\mathbf{else}:\\
\;\;\;\;\left(x - \frac{\frac{y}{z}}{3}\right) + \frac{0.333333333333333315 \cdot \frac{t}{z}}{y}\\
\end{array}double code(double x, double y, double z, double t) {
return ((x - (y / (z * 3.0))) + (t / ((z * 3.0) * y)));
}
double code(double x, double y, double z, double t) {
double temp;
if (((z * 3.0) <= -1.5357642338074745e+112)) {
temp = ((x - (y / (z * 3.0))) + (t / pow((3.0 * (z * y)), 1.0)));
} else {
double temp_1;
if (((z * 3.0) <= 1.3948728084198543e+77)) {
temp_1 = ((x - ((1.0 / z) * (y / 3.0))) + ((1.0 / z) * ((t / 3.0) / y)));
} else {
temp_1 = ((x - ((y / z) / 3.0)) + ((0.3333333333333333 * (t / z)) / y));
}
temp = temp_1;
}
return temp;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 3.5 |
|---|---|
| Target | 1.6 |
| Herbie | 1.0 |
if (* z 3.0) < -1.5357642338074745e+112Initial program 0.8
rmApplied pow10.8
Applied pow10.8
Applied pow10.8
Applied pow-prod-down0.8
Applied pow-prod-down0.8
Simplified0.8
if -1.5357642338074745e+112 < (* z 3.0) < 1.3948728084198543e+77Initial program 6.1
rmApplied associate-/r*1.9
rmApplied *-un-lft-identity1.9
Applied times-frac1.9
rmApplied *-un-lft-identity1.9
Applied *-un-lft-identity1.9
Applied times-frac2.0
Applied times-frac1.1
Simplified1.1
if 1.3948728084198543e+77 < (* z 3.0) Initial program 0.6
rmApplied associate-/r*1.1
rmApplied associate-/r*1.1
Taylor expanded around 0 1.1
Final simplification1.0
herbie shell --seed 2020057
(FPCore (x y z t)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, H"
:precision binary64
:herbie-target
(+ (- x (/ y (* z 3))) (/ (/ t (* z 3)) y))
(+ (- x (/ y (* z 3))) (/ t (* (* z 3) y))))