\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\frac{x + \frac{z}{\frac{t}{y}}}{\left(a + 1\right) + \frac{y \cdot b}{t}}double code(double x, double y, double z, double t, double a, double b) {
return ((double) (((double) (x + ((double) (((double) (y * z)) / t)))) / ((double) (((double) (a + 1.0)) + ((double) (((double) (y * b)) / t))))));
}
double code(double x, double y, double z, double t, double a, double b) {
return ((double) (((double) (x + ((double) (z / ((double) (t / y)))))) / ((double) (((double) (a + 1.0)) + ((double) (((double) (y * b)) / t))))));
}




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.5 |
| Herbie | 16.2 |
Initial program 16.7
rmApplied *-commutative16.7
Applied associate-/l*16.2
Final simplification16.2
herbie shell --seed 2020114 +o rules:numerics
(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 (* (+ x (* (/ y t) z)) (/ 1 (+ (+ a 1) (* (/ y t) b))))) (if (< t 3.036967103737246e-130) (/ z b) (* 1 (* (+ x (* (/ y t) z)) (/ 1 (+ (+ a 1) (* (/ y t) b)))))))
(/ (+ x (/ (* y z) t)) (+ (+ a 1) (/ (* y b) t))))