\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\begin{array}{l}
\mathbf{if}\;y \leq -20715212907.95677 \lor \neg \left(y \leq 5.1154286064408824 \cdot 10^{-71}\right):\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \left(y \cdot z\right) \cdot \frac{1}{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 (<= y -20715212907.95677) (not (<= y 5.1154286064408824e-71))) (/ (+ x (* y (/ z t))) (+ (+ a 1.0) (/ y (/ t b)))) (/ (+ x (* (* y z) (/ 1.0 t))) (+ (+ a 1.0) (/ (* y b) t)))))
double code(double x, double y, double z, double t, double a, double b) {
return (((double) (x + (((double) (y * z)) / t))) / ((double) (((double) (a + 1.0)) + (((double) (y * b)) / t))));
}
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((y <= -20715212907.95677) || !(y <= 5.1154286064408824e-71))) {
tmp = (((double) (x + ((double) (y * (z / t))))) / ((double) (((double) (a + 1.0)) + (y / (t / b)))));
} else {
tmp = (((double) (x + ((double) (((double) (y * z)) * (1.0 / t))))) / ((double) (((double) (a + 1.0)) + (((double) (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.7 |
|---|---|
| Target | 13.3 |
| Herbie | 13.1 |
if y < -20715212907.956772 or 5.11542860644088242e-71 < y Initial program 27.6
rmApplied associate-/l*_binary6424.6
rmApplied associate-/l*_binary6420.9
rmApplied div-inv_binary6420.9
Simplified20.8
if -20715212907.956772 < y < 5.11542860644088242e-71Initial program 3.9
rmApplied div-inv_binary644.0
Final simplification13.1
herbie shell --seed 2020210
(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))))