\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 -6.4912172400090417 \cdot 10^{74}:\\
\;\;\;\;\left(x - \frac{\frac{y}{3}}{z}\right) + \frac{\frac{t}{z \cdot 3}}{y}\\
\mathbf{else}:\\
\;\;\;\;\left(x - \frac{y}{z \cdot 3}\right) + \frac{1}{z} \cdot \frac{\frac{t}{3}}{y}\\
\end{array}double code(double x, double y, double z, double t) {
return ((double) (((double) (x - ((double) (y / ((double) (z * 3.0)))))) + ((double) (t / ((double) (((double) (z * 3.0)) * y))))));
}
double code(double x, double y, double z, double t) {
double VAR;
if ((((double) (z * 3.0)) <= -6.491217240009042e+74)) {
VAR = ((double) (((double) (x - ((double) (((double) (y / 3.0)) / z)))) + ((double) (((double) (t / ((double) (z * 3.0)))) / y))));
} else {
VAR = ((double) (((double) (x - ((double) (y / ((double) (z * 3.0)))))) + ((double) (((double) (1.0 / z)) * ((double) (((double) (t / 3.0)) / y))))));
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 3.5 |
|---|---|
| Target | 1.7 |
| Herbie | 2.6 |
if (* z 3.0) < -6.4912172400090417e74Initial program 0.5
rmApplied associate-/r*1.2
rmApplied *-un-lft-identity1.2
Applied times-frac1.1
rmApplied associate-*l/1.1
Simplified1.1
if -6.4912172400090417e74 < (* z 3.0) Initial program 4.6
rmApplied associate-/r*1.8
rmApplied *-un-lft-identity1.8
Applied *-un-lft-identity1.8
Applied times-frac1.8
Applied times-frac3.1
Simplified3.1
Final simplification2.6
herbie shell --seed 2020175
(FPCore (x y z t)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, H"
:precision binary64
:herbie-target
(+ (- x (/ y (* z 3.0))) (/ (/ t (* z 3.0)) y))
(+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))