\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\begin{array}{l}
\mathbf{if}\;t \le -14924.7663838898643:\\
\;\;\;\;\left(x + \frac{y}{\sqrt[3]{t} \cdot \sqrt[3]{t}} \cdot \frac{z}{\sqrt[3]{t}}\right) \cdot \frac{1}{\left(a + 1\right) + \frac{\sqrt[3]{y} \cdot \sqrt[3]{y}}{\sqrt[3]{t}} \cdot \left(\frac{\sqrt[3]{y}}{\sqrt[3]{t}} \cdot \frac{b}{\sqrt[3]{t}}\right)}\\
\mathbf{elif}\;t \le 1.19965703563040817 \cdot 10^{-31}:\\
\;\;\;\;\left(x + \frac{y \cdot z}{t}\right) \cdot \frac{1}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y}{\sqrt{t}} \cdot \frac{z}{\sqrt{t}}}{\left(a + 1\right) + \frac{y}{\sqrt[3]{t} \cdot \sqrt[3]{t}} \cdot \frac{b}{\sqrt[3]{t}}}\\
\end{array}double code(double x, double y, double z, double t, double a, double b) {
return ((x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)));
}
double code(double x, double y, double z, double t, double a, double b) {
double VAR;
if ((t <= -14924.766383889864)) {
VAR = ((x + ((y / (cbrt(t) * cbrt(t))) * (z / cbrt(t)))) * (1.0 / ((a + 1.0) + (((cbrt(y) * cbrt(y)) / cbrt(t)) * ((cbrt(y) / cbrt(t)) * (b / cbrt(t)))))));
} else {
double VAR_1;
if ((t <= 1.1996570356304082e-31)) {
VAR_1 = ((x + ((y * z) / t)) * (1.0 / ((a + 1.0) + ((y * b) / t))));
} else {
VAR_1 = ((x + ((y / sqrt(t)) * (z / sqrt(t)))) / ((a + 1.0) + ((y / (cbrt(t) * cbrt(t))) * (b / cbrt(t)))));
}
VAR = VAR_1;
}
return VAR;
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a




Bits error versus b
Results
| Original | 16.7 |
|---|---|
| Target | 13.6 |
| Herbie | 12.8 |
if t < -14924.766383889864Initial program 11.6
rmApplied add-cube-cbrt11.7
Applied times-frac8.4
rmApplied add-cube-cbrt8.4
Applied times-frac8.4
Applied associate-*l*8.4
rmApplied add-cube-cbrt8.5
Applied times-frac4.2
rmApplied div-inv4.3
if -14924.766383889864 < t < 1.1996570356304082e-31Initial program 22.3
rmApplied div-inv22.4
if 1.1996570356304082e-31 < t Initial program 12.0
rmApplied add-cube-cbrt12.0
Applied times-frac9.3
rmApplied add-sqr-sqrt9.4
Applied times-frac4.9
Final simplification12.8
herbie shell --seed 2020106
(FPCore (x y z t a b)
:name "Diagrams.Solve.Tridiagonal:solveCyclicTriDiagonal from diagrams-solve-0.1, B"
:precision binary64
:herbie-target
(if (< t -1.3659085366310088e-271) (* 1 (* (+ x (* (/ y t) z)) (/ 1 (+ (+ a 1) (* (/ y t) b))))) (if (< t 3.036967103737246e-130) (/ z b) (* 1 (* (+ x (* (/ y t) z)) (/ 1 (+ (+ a 1) (* (/ y t) b)))))))
(/ (+ x (/ (* y z) t)) (+ (+ a 1) (/ (* y b) t))))