\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\begin{array}{l}
\mathbf{if}\;t \le -2.75807710187154 \cdot 10^{35} \lor \neg \left(t \le 1.12550739877708214 \cdot 10^{-43}\right):\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + \frac{y}{\sqrt[3]{t} \cdot \sqrt[3]{t}} \cdot \frac{b}{\sqrt[3]{\sqrt[3]{t} \cdot \sqrt[3]{t}} \cdot \sqrt[3]{\sqrt[3]{t}}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{\left(a + 1\right) + \frac{y \cdot b}{t}}{x + \frac{y \cdot z}{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 <= -2.7580771018715404e+35) || !(t <= 1.1255073987770821e-43))) {
VAR = ((x + (y * (z / t))) / ((a + 1.0) + ((y / (cbrt(t) * cbrt(t))) * (b / (cbrt((cbrt(t) * cbrt(t))) * cbrt(cbrt(t)))))));
} else {
VAR = (1.0 / (((a + 1.0) + ((y * b) / t)) / (x + ((y * z) / t))));
}
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.8 |
|---|---|
| Target | 12.9 |
| Herbie | 12.9 |
if t < -2.7580771018715404e+35 or 1.1255073987770821e-43 < t Initial program 11.9
rmApplied add-cube-cbrt11.9
Applied times-frac9.1
rmApplied *-un-lft-identity9.1
Applied times-frac4.4
Simplified4.4
rmApplied add-cube-cbrt4.4
Applied cbrt-prod4.4
if -2.7580771018715404e+35 < t < 1.1255073987770821e-43Initial program 22.2
rmApplied clear-num22.4
Final simplification12.9
herbie shell --seed 2020102
(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))))