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



Bits error versus x
Results
Initial program 0.2
Taylor expanded around 0 0.2
Final simplification0.2
herbie shell --seed 2021118
(FPCore (x)
:name "Diagrams.Tangent:$catParam from diagrams-lib-1.3.0.3, F"
:precision binary64
(* (* x 3.0) x))