\left(x - \frac{y}{z \cdot 3}\right) + \frac{t}{\left(z \cdot 3\right) \cdot y}\begin{array}{l}
\mathbf{if}\;t \leq -4.833879571757204 \cdot 10^{+31}:\\
\;\;\;\;\left(x - \frac{y}{z \cdot 3}\right) + 0.3333333333333333 \cdot \frac{t}{y \cdot z}\\
\mathbf{elif}\;t \leq 1.664154512901837 \cdot 10^{-124}:\\
\;\;\;\;\left(x - \frac{y}{z \cdot 3}\right) + \frac{1}{z \cdot 3} \cdot \frac{t}{y}\\
\mathbf{else}:\\
\;\;\;\;\left(x - \frac{\frac{y}{z}}{3}\right) + \frac{t}{y \cdot \left(z \cdot 3\right)}\\
\end{array}(FPCore (x y z t) :precision binary64 (+ (- x (/ y (* z 3.0))) (/ t (* (* z 3.0) y))))
(FPCore (x y z t)
:precision binary64
(if (<= t -4.833879571757204e+31)
(+ (- x (/ y (* z 3.0))) (* 0.3333333333333333 (/ t (* y z))))
(if (<= t 1.664154512901837e-124)
(+ (- x (/ y (* z 3.0))) (* (/ 1.0 (* z 3.0)) (/ t y)))
(+ (- x (/ (/ y z) 3.0)) (/ t (* y (* z 3.0)))))))double code(double x, double y, double z, double t) {
return ((double) (((double) (x - (y / ((double) (z * 3.0))))) + (t / ((double) (((double) (z * 3.0)) * y)))));
}
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -4.833879571757204e+31)) {
tmp = ((double) (((double) (x - (y / ((double) (z * 3.0))))) + ((double) (0.3333333333333333 * (t / ((double) (y * z)))))));
} else {
double tmp_1;
if ((t <= 1.664154512901837e-124)) {
tmp_1 = ((double) (((double) (x - (y / ((double) (z * 3.0))))) + ((double) ((1.0 / ((double) (z * 3.0))) * (t / y)))));
} else {
tmp_1 = ((double) (((double) (x - ((y / z) / 3.0))) + (t / ((double) (y * ((double) (z * 3.0)))))));
}
tmp = tmp_1;
}
return tmp;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t
Results
| Original | 3.7 |
|---|---|
| Target | 1.8 |
| Herbie | 0.8 |
if t < -4.8338795717572036e31Initial program 0.6
Taylor expanded around 0 0.7
if -4.8338795717572036e31 < t < 1.66415451290183694e-124Initial program 6.2
rmApplied *-un-lft-identity_binary646.2
Applied times-frac_binary640.3
if 1.66415451290183694e-124 < t Initial program 1.6
rmApplied associate-/r*_binary641.6
Final simplification0.8
herbie shell --seed 2020205
(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))))