\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\begin{array}{l}
\mathbf{if}\;t \leq -2.4972769510363455 \cdot 10^{+80}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
\mathbf{elif}\;t \leq 2.3404855533204465 \cdot 10^{+32}:\\
\;\;\;\;\frac{z}{\frac{t \cdot a}{y} + \left(b + \frac{t}{y}\right)} + \frac{x}{a + \left(1 + \frac{y \cdot b}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a + \left(1 + \frac{y \cdot b}{t}\right)} + \frac{1}{\sqrt[3]{t} \cdot \sqrt[3]{t}} \cdot \frac{z}{\frac{\sqrt[3]{t}}{\frac{y}{a + \left(1 + \frac{b}{\frac{t}{y}}\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 (<= t -2.4972769510363455e+80)
(/ (+ x (* y (/ z t))) (+ (+ a 1.0) (/ (* y b) t)))
(if (<= t 2.3404855533204465e+32)
(+
(/ z (+ (/ (* t a) y) (+ b (/ t y))))
(/ x (+ a (+ 1.0 (/ (* y b) t)))))
(+
(/ x (+ a (+ 1.0 (/ (* y b) t))))
(*
(/ 1.0 (* (cbrt t) (cbrt t)))
(/ z (/ (cbrt t) (/ y (+ a (+ 1.0 (/ b (/ t y))))))))))))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.4972769510363455e+80) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + ((y * b) / t));
} else if (t <= 2.3404855533204465e+32) {
tmp = (z / (((t * a) / y) + (b + (t / y)))) + (x / (a + (1.0 + ((y * b) / t))));
} else {
tmp = (x / (a + (1.0 + ((y * b) / t)))) + ((1.0 / (cbrt(t) * cbrt(t))) * (z / (cbrt(t) / (y / (a + (1.0 + (b / (t / y))))))));
}
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.9 |
|---|---|
| Target | 13.2 |
| Herbie | 4.5 |
if t < -2.49727695103634555e80Initial program 12.1
rmApplied *-un-lft-identity_binary64_1610512.1
Applied times-frac_binary64_161116.9
Simplified6.9
if -2.49727695103634555e80 < t < 2.34048555332044649e32Initial program 20.8
Taylor expanded around 0 16.5
Simplified16.5
rmApplied associate-/l*_binary64_1605014.8
Simplified17.8
Taylor expanded around 0 2.9
if 2.34048555332044649e32 < t Initial program 11.2
Taylor expanded around 0 12.6
Simplified12.6
rmApplied associate-/l*_binary64_1605010.5
Simplified8.8
rmApplied *-un-lft-identity_binary64_161058.8
Applied *-un-lft-identity_binary64_161058.8
Applied times-frac_binary64_161118.8
Applied add-cube-cbrt_binary64_161409.0
Applied times-frac_binary64_161119.0
Applied *-un-lft-identity_binary64_161059.0
Applied times-frac_binary64_161118.7
Simplified8.7
Simplified6.6
Final simplification4.5
herbie shell --seed 2021023
(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))))