\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\begin{array}{l}
\mathbf{if}\;t \le -5.70151277635625122 \cdot 10^{-30}:\\
\;\;\;\;\frac{\frac{y}{\frac{t}{z}} + x}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\
\mathbf{elif}\;t \le 9.2919357485169675 \cdot 10^{137}:\\
\;\;\;\;\frac{x + \frac{1}{\frac{t}{y \cdot z}}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y}{\sqrt[3]{t} \cdot \sqrt[3]{t}} \cdot \frac{z}{\sqrt[3]{t}}}{\left(a + 1\right) + \frac{\frac{y}{\sqrt[3]{t} \cdot \sqrt[3]{t}} \cdot b}{\sqrt[3]{t}}}\\
\end{array}double code(double x, double y, double z, double t, double a, double b) {
return (((double) (x + (((double) (y * z)) / t))) / ((double) (((double) (a + 1.0)) + (((double) (y * b)) / t))));
}
double code(double x, double y, double z, double t, double a, double b) {
double VAR;
if ((t <= -5.701512776356251e-30)) {
VAR = (((double) ((y / (t / z)) + x)) / ((double) (((double) (a + 1.0)) + ((double) (b * (y / t))))));
} else {
double VAR_1;
if ((t <= 9.291935748516968e+137)) {
VAR_1 = (((double) (x + (1.0 / (t / ((double) (y * z)))))) / ((double) (((double) (a + 1.0)) + (((double) (y * b)) / t))));
} else {
VAR_1 = (((double) (x + ((double) ((y / ((double) (((double) cbrt(t)) * ((double) cbrt(t))))) * (z / ((double) cbrt(t))))))) / ((double) (((double) (a + 1.0)) + (((double) ((y / ((double) (((double) cbrt(t)) * ((double) cbrt(t))))) * b)) / ((double) 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.5 |
|---|---|
| Target | 12.9 |
| Herbie | 13.2 |
if t < -5.70151277635625122e-30Initial program 11.3
rmApplied add-cube-cbrt11.5
Applied times-frac8.5
rmApplied add-cube-cbrt8.5
Applied times-frac4.8
rmApplied *-un-lft-identity4.8
Applied *-un-lft-identity4.8
Applied times-frac4.8
Simplified4.8
Simplified4.9
if -5.70151277635625122e-30 < t < 9.2919357485169675e137Initial program 20.0
rmApplied clear-num20.0
if 9.2919357485169675e137 < t Initial program 12.6
rmApplied add-cube-cbrt12.7
Applied times-frac8.0
rmApplied add-cube-cbrt8.0
Applied times-frac1.5
rmApplied associate-*r/2.4
Final simplification13.2
herbie shell --seed 2020181
(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.0 (* (+ x (* (/ y t) z)) (/ 1.0 (+ (+ a 1.0) (* (/ y t) b))))) (if (< t 3.036967103737246e-130) (/ z b) (* 1.0 (* (+ x (* (/ y t) z)) (/ 1.0 (+ (+ a 1.0) (* (/ y t) b)))))))
(/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))