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




Bits error versus x




Bits error versus y




Bits error versus z




Bits error versus t




Bits error versus a
Results
| Original | 10.5 |
|---|---|
| Target | 1.8 |
| Herbie | 3.0 |
Initial program 10.5
rmApplied div-sub_binary64_1952010.5
Simplified10.5
Simplified10.5
rmApplied *-un-lft-identity_binary64_1951510.5
Applied times-frac_binary64_195217.8
Simplified7.8
Taylor expanded around 0 10.5
Simplified3.0
Final simplification3.0
herbie shell --seed 2020344
(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))))