\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\begin{array}{l}
\mathbf{if}\;t \leq -3.2205559183799586 \cdot 10^{+86}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\
\mathbf{elif}\;t \leq 1.3073725756224432 \cdot 10^{-25}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \left(y \cdot b\right) \cdot \frac{1}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y}{\sqrt{t}} \cdot \frac{z}{\sqrt{t}}}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\
\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 (<= t -3.2205559183799586e+86)
(/ (+ x (* y (/ z t))) (+ (+ a 1.0) (/ y (/ t b))))
(if (<= t 1.3073725756224432e-25)
(/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (* (* y b) (/ 1.0 t))))
(/ (+ x (* (/ y (sqrt t)) (/ z (sqrt t)))) (+ (+ a 1.0) (/ y (/ t b)))))))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 <= -3.2205559183799586e+86) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y / (t / b)));
} else if (t <= 1.3073725756224432e-25) {
tmp = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) * (1.0 / t)));
} else {
tmp = (x + ((y / sqrt(t)) * (z / sqrt(t)))) / ((a + 1.0) + (y / (t / b)));
}
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.5 |
|---|---|
| Target | 13.4 |
| Herbie | 13.0 |
if t < -3.2205559183799586e86Initial program 11.0
rmApplied associate-/l*_binary647.7
rmApplied *-un-lft-identity_binary647.7
Applied times-frac_binary642.3
Simplified2.3
if -3.2205559183799586e86 < t < 1.3073725756224432e-25Initial program 21.1
rmApplied div-inv_binary6421.1
if 1.3073725756224432e-25 < t Initial program 11.1
rmApplied associate-/l*_binary648.2
rmApplied add-sqr-sqrt_binary648.3
Applied times-frac_binary644.1
Final simplification13.0
herbie shell --seed 2020220
(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))))