\left(x \cdot 3\right) \cdot x
x \cdot \left(x \cdot 3\right)
(FPCore (x) :precision binary64 (* (* x 3.0) x))
(FPCore (x) :precision binary64 (* x (* x 3.0)))
double code(double x) {
return (x * 3.0) * x;
}
double code(double x) {
return x * (x * 3.0);
}






Bits error versus x
Results
| Alternative 1 | |
|---|---|
| Error | 0.2 |
| Cost | 320 |
| Alternative 2 | |
|---|---|
| Error | 42.1 |
| Cost | 64 |
| Alternative 3 | |
|---|---|
| Error | 61.0 |
| Cost | 64 |


Initial program 0.2
rmApplied *-un-lft-identity_binary64_45110.2
rmApplied pow1_binary64_45720.2
rmApplied *-un-lft-identity_binary64_45110.2
rmApplied associate-*l*_binary64_44520.2
Simplified0.2
Simplified0.2
Final simplification0.2
herbie shell --seed 2021065
(FPCore (x)
:name "Diagrams.Tangent:$catParam from diagrams-lib-1.3.0.3, F"
:precision binary64
(* (* x 3.0) x))