x \cdot \sin y + z \cdot \cos y
\sin y \cdot x + z \cdot \cos y
(FPCore (x y z) :precision binary64 (+ (* x (sin y)) (* z (cos y))))
(FPCore (x y z) :precision binary64 (+ (* (sin y) x) (* z (cos y))))
double code(double x, double y, double z) {
return (x * sin(y)) + (z * cos(y));
}
double code(double x, double y, double z) {
return (sin(y) * x) + (z * cos(y));
}







Bits error versus x







Bits error versus y







Bits error versus z
Results
| Alternative 1 | |
|---|---|
| Accuracy | 0.6 |
| Cost | 1152 |
| Alternative 2 | |
|---|---|
| Accuracy | 16.3 |
| Cost | 1282 |
| Alternative 3 | |
|---|---|
| Accuracy | 24.9 |
| Cost | 1089 |
| Alternative 4 | |
|---|---|
| Accuracy | 33.9 |
| Cost | 704 |
Initial program 0.1
rmApplied *-un-lft-identity_binary64_62160.1
rmApplied pow1_binary64_62770.1
rmApplied *-commutative_binary64_61470.1
Final simplification0.1
herbie shell --seed 2020322
(FPCore (x y z)
:name "Diagrams.ThreeD.Transform:aboutX from diagrams-lib-1.3.0.3, B"
:precision binary64
(+ (* x (sin y)) (* z (cos y))))