\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}\begin{array}{l}
\mathbf{if}\;x \le -2.01746334205637897 \cdot 10^{-291} \lor \neg \left(x \le 1.400681836821822 \cdot 10^{37}\right):\\
\;\;\;\;\left(x - \frac{y}{z \cdot 3}\right) + \frac{1}{\left(y \cdot \left(\sqrt[3]{3} \cdot \sqrt[3]{3}\right)\right) \cdot \frac{z}{\frac{t}{\sqrt[3]{3}}}}\\
\mathbf{else}:\\
\;\;\;\;\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{y} \cdot \frac{0.333333333333333315}{z}\\
\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 (((x <= -2.017463342056379e-291) || !(x <= 1.4006818368218224e+37))) {
VAR = ((double) (((double) (x - ((double) (y / ((double) (z * 3.0)))))) + ((double) (1.0 / ((double) (((double) (y * ((double) (((double) cbrt(3.0)) * ((double) cbrt(3.0)))))) * ((double) (z / ((double) (t / ((double) cbrt(3.0))))))))))));
} else {
VAR = ((double) (((double) (x - ((double) (y / ((double) (z * 3.0)))))) + ((double) (((double) (t / y)) * ((double) (0.3333333333333333 / z))))));
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 3.5 |
|---|---|
| Target | 1.8 |
| Herbie | 2.1 |
if x < -2.01746334205637897e-291 or 1.400681836821822e37 < x Initial program 3.3
rmApplied clear-num3.4
Simplified1.3
rmApplied add-cube-cbrt1.3
Applied *-un-lft-identity1.3
Applied times-frac1.3
Applied *-un-lft-identity1.3
Applied times-frac1.3
Applied associate-*r*1.3
Simplified1.3
if -2.01746334205637897e-291 < x < 1.400681836821822e37Initial program 4.0
Taylor expanded around 0 4.1
Simplified3.8
Final simplification2.1
herbie shell --seed 2020179
(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))))