\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 12060 \cdot \frac{x - y}{z - t} + a \cdot 120(FPCore (x y z t a) :precision binary64 (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))
(FPCore (x y z t a) :precision binary64 (+ (* 60.0 (/ (- x y) (- z t))) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
return ((60.0 * (x - y)) / (z - t)) + (a * 120.0);
}
double code(double x, double y, double z, double t, double a) {
return (60.0 * ((x - y) / (z - t))) + (a * 120.0);
}












Bits error versus x












Bits error versus y












Bits error versus z












Bits error versus t












Bits error versus a
Results
| Original | 0.3 |
|---|---|
| Target | 0.2 |
| Herbie | 0.1 |
| Alternative 1 | |
|---|---|
| Accuracy | 0.1 |
| Cost | 1088 |
| Alternative 2 | |
|---|---|
| Accuracy | 0.2 |
| Cost | 960 |
| Alternative 3 | |
|---|---|
| Accuracy | 15.3 |
| Cost | 2308 |
| Alternative 4 | |
|---|---|
| Accuracy | 22.0 |
| Cost | 2953 |
| Alternative 5 | |
|---|---|
| Accuracy | 30.1 |
| Cost | 2052 |
| Alternative 6 | |
|---|---|
| Accuracy | 30.1 |
| Cost | 2052 |
| Alternative 7 | |
|---|---|
| Accuracy | 30.1 |
| Cost | 2052 |
| Alternative 8 | |
|---|---|
| Accuracy | 30.4 |
| Cost | 1728 |
Initial program 0.3
rmApplied *-un-lft-identity_binary64_242890.3
Applied times-frac_binary64_242950.1
Simplified0.1
rmApplied *-un-lft-identity_binary64_242890.1
Applied *-un-lft-identity_binary64_242890.1
Applied times-frac_binary64_242950.1
Simplified0.1
rmApplied *-un-lft-identity_binary64_242890.1
Applied *-un-lft-identity_binary64_242890.1
Applied distribute-lft-out--_binary64_242410.1
Applied *-un-lft-identity_binary64_242890.1
Applied times-frac_binary64_242950.1
Simplified0.1
rmApplied pow1_binary64_243500.1
Final simplification0.1
herbie shell --seed 2020322
(FPCore (x y z t a)
:name "Data.Colour.RGB:hslsv from colour-2.3.3, B"
:precision binary64
:herbie-target
(+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0))
(+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))