\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\begin{array}{l}
\mathbf{if}\;t \leq -2.3732692961566745 \cdot 10^{+89} \lor \neg \left(t \leq 1.0329017281745015 \cdot 10^{+43}\right):\\
\;\;\;\;\frac{x + \frac{y}{\sqrt[3]{t} \cdot \sqrt[3]{t}} \cdot \frac{z}{\sqrt[3]{t}}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{\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 -2.3732692961566745e+89) (not (<= t 1.0329017281745015e+43)))
(/
(+ x (* (/ y (* (cbrt t) (cbrt t))) (/ z (cbrt t))))
(+ (+ a 1.0) (* y (/ b t))))
(/ (+ x (/ (* y z) t)) (+ (+ 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 <= -2.3732692961566745e+89) || !(t <= 1.0329017281745015e+43)) {
tmp = (x + ((y / (cbrt(t) * cbrt(t))) * (z / cbrt(t)))) / ((a + 1.0) + (y * (b / t)));
} else {
tmp = (x + ((y * z) / t)) / ((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.3 |
|---|---|
| Target | 13.5 |
| Herbie | 12.7 |
if t < -2.37326929615667447e89 or 1.0329017281745015e43 < t Initial program 11.7
rmApplied *-un-lft-identity_binary64_2122011.7
Applied times-frac_binary64_212268.2
Simplified8.2
rmApplied add-cube-cbrt_binary64_212558.3
Applied times-frac_binary64_212262.9
if -2.37326929615667447e89 < t < 1.0329017281745015e43Initial program 19.4
Final simplification12.7
herbie shell --seed 2020346
(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))))