\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\begin{array}{l}
\mathbf{if}\;t \leq 111388418267126.45:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y}{\sqrt{t}} \cdot \frac{z}{\sqrt{t}}}{\left(a + 1\right) + y \cdot \frac{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 (<= t 111388418267126.45) (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))) (/ (+ x (* (/ y (sqrt t)) (/ z (sqrt 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 ((t <= 111388418267126.45)) {
tmp = (((double) (x + (((double) (y * z)) / t))) / ((double) (((double) (a + 1.0)) + (((double) (y * b)) / t))));
} else {
tmp = (((double) (x + ((double) ((y / ((double) sqrt(t))) * (z / ((double) sqrt(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.1 |
| Herbie | 14.8 |
if t < 111388418267126.453Initial program Error: 18.5 bits
if 111388418267126.453 < t Initial program Error: 11.1 bits
rmApplied *-un-lft-identityError: 11.1 bits
Applied times-fracError: 7.8 bits
SimplifiedError: 7.8 bits
rmApplied add-sqr-sqrtError: 7.9 bits
Applied times-fracError: 3.3 bits
Final simplificationError: 14.8 bits
herbie shell --seed 2020204
(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))))