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












Bits error versus x












Bits error versus y












Bits error versus z












Bits error versus t












Bits error versus a
Results
| Original | 7.8 |
|---|---|
| Target | 6.0 |
| Herbie | 7.8 |
| Alternative 1 | |
|---|---|
| Error | 7.8 |
| Cost | 576 |
| Alternative 2 | |
|---|---|
| Error | 20.4 |
| Cost | 1994 |
| Alternative 3 | |
|---|---|
| Error | 20.4 |
| Cost | 1930 |
| Alternative 4 | |
|---|---|
| Error | 20.3 |
| Cost | 1930 |
| Alternative 5 | |
|---|---|
| Error | 20.3 |
| Cost | 1489 |
| Alternative 6 | |
|---|---|
| Error | 33.0 |
| Cost | 320 |
| Alternative 7 | |
|---|---|
| Error | 57.7 |
| Cost | 64 |
| Alternative 8 | |
|---|---|
| Error | 61.8 |
| Cost | 64 |

Initial program 7.8
rmApplied div-sub_binary64_181567.8
Simplified7.8
Final simplification7.8
herbie shell --seed 2021044
(FPCore (x y z t a)
:name "Data.Colour.Matrix:inverse from colour-2.3.3, B"
:precision binary64
:herbie-target
(if (< z -2.468684968699548e+170) (- (* (/ y a) x) (* (/ t a) z)) (if (< z 6.309831121978371e-71) (/ (- (* x y) (* z t)) a) (- (* (/ y a) x) (* (/ t a) z))))
(/ (- (* x y) (* z t)) a))