\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\begin{array}{l}
\mathbf{if}\;t \le -9.17200890691482814 \cdot 10^{123}:\\
\;\;\;\;\frac{x + \left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot \left(\sqrt[3]{y} \cdot \frac{z}{t}\right)}{\left(a + 1\right) + \frac{\frac{y}{\sqrt[3]{t}} \cdot \frac{b}{\sqrt[3]{t}}}{\sqrt[3]{t}}}\\
\mathbf{elif}\;t \le 3.07029640983915937 \cdot 10^{27}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{1}{\frac{t}{y \cdot b}}}\\
\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 <= -9.172008906914828e+123)) {
VAR = ((x + ((cbrt(y) * cbrt(y)) * (cbrt(y) * (z / t)))) / ((a + 1.0) + (((y / cbrt(t)) * (b / cbrt(t))) / cbrt(t))));
} else {
double VAR_1;
if ((t <= 3.0702964098391594e+27)) {
VAR_1 = ((x + ((y * z) / t)) / ((a + 1.0) + (1.0 / (t / (y * b)))));
} 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.4 |
|---|---|
| Target | 12.9 |
| Herbie | 13.1 |
if t < -9.172008906914828e+123Initial program 11.8
rmApplied add-cube-cbrt11.8
Applied times-frac7.7
rmApplied *-un-lft-identity7.7
Applied times-frac1.8
Simplified1.8
rmApplied add-cube-cbrt2.0
Applied associate-*l*2.0
rmApplied associate-*r/2.9
Simplified2.9
if -9.172008906914828e+123 < t < 3.0702964098391594e+27Initial program 19.5
rmApplied clear-num19.5
if 3.0702964098391594e+27 < t Initial program 11.6
rmApplied add-cube-cbrt11.7
Applied times-frac8.5
rmApplied add-sqr-sqrt8.5
Applied times-frac3.4
Final simplification13.1
herbie shell --seed 2020079
(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))))