\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\begin{array}{l}
\mathbf{if}\;t \le -9.3618690804013134 \cdot 10^{-114}:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\
\mathbf{elif}\;t \le 3.61118246991306439 \cdot 10^{-221}:\\
\;\;\;\;\frac{1}{\sqrt[3]{\left(a + 1\right) + \frac{y \cdot b}{t}} \cdot \sqrt[3]{\left(a + 1\right) + \frac{y \cdot b}{t}}} \cdot \frac{x + \frac{y \cdot z}{t}}{\sqrt[3]{\left(a + 1\right) + \frac{y \cdot b}{t}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{\frac{z}{t}}{\frac{1}{y}}}{\left(a + 1\right) + \frac{y \cdot b}{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 <= -9.361869080401313e-114)) {
VAR = ((x + (y / (t / z))) / ((a + 1.0) + (y / (t / b))));
} else {
double VAR_1;
if ((t <= 3.6111824699130644e-221)) {
VAR_1 = ((1.0 / (cbrt(((a + 1.0) + ((y * b) / t))) * cbrt(((a + 1.0) + ((y * b) / t))))) * ((x + ((y * z) / t)) / cbrt(((a + 1.0) + ((y * b) / t)))));
} else {
VAR_1 = ((x + ((z / t) / (1.0 / y))) / ((a + 1.0) + ((y * b) / 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 | 13.1 |
| Herbie | 15.1 |
if t < -9.361869080401313e-114Initial program 11.4
rmApplied associate-/l*9.7
rmApplied associate-/l*7.1
if -9.361869080401313e-114 < t < 3.6111824699130644e-221Initial program 28.9
rmApplied add-cube-cbrt29.3
Applied *-un-lft-identity29.3
Applied times-frac29.3
if 3.6111824699130644e-221 < t Initial program 14.4
rmApplied associate-/l*14.2
rmApplied clear-num14.2
rmApplied div-inv14.2
Applied associate-/r*14.5
Simplified14.5
Final simplification15.1
herbie shell --seed 2020092
(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))))