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



Bits error versus x
Results
Initial program 0.2
Taylor expanded in x around 0 0.2
Applied add-cube-cbrt_binary640.2
Applied associate-*l*_binary640.3
Applied unpow2_binary640.3
Applied associate-*r*_binary640.3
Applied associate-*r*_binary640.3
Simplified0.2
Final simplification0.2
herbie shell --seed 2022160
(FPCore (x)
:name "Diagrams.Tangent:$catParam from diagrams-lib-1.3.0.3, F"
:precision binary64
(* (* x 3.0) x))