\frac{x}{y} + \frac{2 + \left(z \cdot 2\right) \cdot \left(1 - t\right)}{t \cdot z}\frac{x}{y} + \left(-2 + \frac{2 + \frac{2}{z}}{t}\right)(FPCore (x y z t) :precision binary64 (+ (/ x y) (/ (+ 2.0 (* (* z 2.0) (- 1.0 t))) (* t z))))
(FPCore (x y z t) :precision binary64 (+ (/ x y) (+ -2.0 (/ (+ 2.0 (/ 2.0 z)) t))))
double code(double x, double y, double z, double t) {
return (x / y) + ((2.0 + ((z * 2.0) * (1.0 - t))) / (t * z));
}
double code(double x, double y, double z, double t) {
return (x / y) + (-2.0 + ((2.0 + (2.0 / z)) / t));
}













Bits error versus x













Bits error versus y













Bits error versus z













Bits error versus t
Results
| Original | 9.8 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
| Alternative 1 | |
|---|---|
| Error | 0.7 |
| Cost | 1288 |
| Alternative 2 | |
|---|---|
| Error | 5.0 |
| Cost | 1602 |
| Alternative 3 | |
|---|---|
| Error | 5.9 |
| Cost | 904 |
| Alternative 4 | |
|---|---|
| Error | 11.9 |
| Cost | 776 |
| Alternative 5 | |
|---|---|
| Error | 26.7 |
| Cost | 913 |
| Alternative 6 | |
|---|---|
| Error | 35.3 |
| Cost | 904 |
| Alternative 7 | |
|---|---|
| Error | 42.5 |
| Cost | 776 |
| Alternative 8 | |
|---|---|
| Error | 59.5 |
| Cost | 64 |
| Alternative 9 | |
|---|---|
| Error | 62.3 |
| Cost | 64 |

Initial program 9.8
Simplified0.1
Simplified0.1
Final simplification0.1
herbie shell --seed 2021044
(FPCore (x y z t)
:name "Data.HashTable.ST.Basic:computeOverhead from hashtables-1.2.0.2"
:precision binary64
:herbie-target
(- (/ (+ (/ 2.0 z) 2.0) t) (- 2.0 (/ x y)))
(+ (/ x y) (/ (+ 2.0 (* (* z 2.0) (- 1.0 t))) (* t z))))