\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\begin{array}{l}
\mathbf{if}\;y \leq -1.2246087210784099 \cdot 10^{+43}:\\
\;\;\;\;\frac{z}{b + \frac{t}{y} \cdot \left(a + 1\right)} + \frac{x}{a + \left(1 + \frac{y}{\frac{t}{b}}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b + \frac{t \cdot \left(a + 1\right)}{y}} + \frac{x}{a + \left(1 + \frac{y \cdot b}{t}\right)}\\
\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 (<= y -1.2246087210784099e+43) (+ (/ z (+ b (* (/ t y) (+ a 1.0)))) (/ x (+ a (+ 1.0 (/ y (/ t b)))))) (+ (/ z (+ b (/ (* t (+ a 1.0)) y))) (/ x (+ 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 (y <= -1.2246087210784099e+43) {
tmp = (z / (b + ((t / y) * (a + 1.0)))) + (x / (a + (1.0 + (y / (t / b)))));
} else {
tmp = (z / (b + ((t * (a + 1.0)) / y))) + (x / (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 | 17.1 |
|---|---|
| Target | 13.3 |
| Herbie | 3.7 |
if y < -1.22460872107840986e43Initial program 33.3
Taylor expanded around 0 30.5
Simplified30.5
rmApplied associate-/l*_binary6424.6
Simplified22.8
Taylor expanded around 0 8.0
Simplified6.0
rmApplied associate-/l*_binary642.9
if -1.22460872107840986e43 < y Initial program 12.7
Taylor expanded around 0 11.1
Simplified11.1
rmApplied associate-/l*_binary649.8
Simplified11.4
Taylor expanded around 0 7.3
Simplified3.5
rmApplied associate-*l/_binary644.0
Final simplification3.7
herbie shell --seed 2021126
(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))))