\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\begin{array}{l}
\mathbf{if}\;t \leq -8.364969374598222 \cdot 10^{+57} \lor \neg \left(t \leq 1.0032985197042793 \cdot 10^{+27}\right):\\
\;\;\;\;\frac{x + \frac{y}{\sqrt[3]{t} \cdot \sqrt[3]{t}} \cdot \frac{z}{\sqrt[3]{t}}}{\left(a + 1\right) + \frac{y}{\sqrt[3]{t} \cdot \sqrt[3]{t}} \cdot \frac{b}{\sqrt[3]{t}}}\\
\mathbf{else}:\\
\;\;\;\;\left(x + \frac{y \cdot z}{t}\right) \cdot \frac{1}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
\end{array}(FPCore (x y z t a b) :precision binary64 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
(FPCore (x y z t a b)
:precision binary64
(if (or (<= t -8.364969374598222e+57) (not (<= t 1.0032985197042793e+27)))
(/
(+ x (* (/ y (* (cbrt t) (cbrt t))) (/ z (cbrt t))))
(+ (+ a 1.0) (* (/ y (* (cbrt t) (cbrt t))) (/ b (cbrt t)))))
(* (+ x (/ (* y z) t)) (/ 1.0 (+ (+ a 1.0) (/ (* y b) t))))))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 tmp;
if ((t <= -8.364969374598222e+57) || !(t <= 1.0032985197042793e+27)) {
tmp = (x + ((y / (cbrt(t) * cbrt(t))) * (z / cbrt(t)))) / ((a + 1.0) + ((y / (cbrt(t) * cbrt(t))) * (b / cbrt(t))));
} else {
tmp = (x + ((y * z) / t)) * (1.0 / ((a + 1.0) + ((y * b) / t)));
}
return tmp;
}




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.2 |
|---|---|
| Target | 13.2 |
| Herbie | 12.5 |
if t < -8.3649693745982215e57 or 1.00329851970427931e27 < t Initial program 11.7
rmApplied add-cube-cbrt_binary64_1214811.8
Applied times-frac_binary64_121727.7
rmApplied add-cube-cbrt_binary64_121487.7
Applied times-frac_binary64_121723.1
if -8.3649693745982215e57 < t < 1.00329851970427931e27Initial program 19.7
rmApplied div-inv_binary64_1217819.8
Final simplification12.5
herbie shell --seed 2020270
(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))))