\frac{x - y \cdot z}{t - a \cdot z}\frac{x - y \cdot z}{t - a \cdot z}double code(double x, double y, double z, double t, double a) {
return ((double) (((double) (x - ((double) (y * z)))) / ((double) (t - ((double) (a * z))))));
}
double code(double x, double y, double z, double t, double a) {
return ((double) (((double) (x - ((double) (y * z)))) / ((double) (t - ((double) (a * z))))));
}




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 10.2 |
|---|---|
| Target | 1.7 |
| Herbie | 10.2 |
Initial program 10.2
Final simplification10.2
herbie shell --seed 2020148
(FPCore (x y z t a)
:name "Diagrams.Solve.Tridiagonal:solveTriDiagonal from diagrams-solve-0.1, A"
:precision binary64
:herbie-target
(if (< z -32113435955957344.0) (- (/ x (- t (* a z))) (/ y (- (/ t z) a))) (if (< z 3.5139522372978296e-86) (* (- x (* y z)) (/ 1.0 (- t (* a z)))) (- (/ x (- t (* a z))) (/ y (- (/ t z) a)))))
(/ (- x (* y z)) (- t (* a z))))