\cos x \cdot e^{10 \cdot \left(x \cdot x\right)}
\cos x \cdot {\left({\left(e^{10}\right)}^{\left(\frac{x}{2}\right)} \cdot {\left(\sqrt{e^{10}}\right)}^{x}\right)}^{x}
(FPCore (x) :precision binary64 (* (cos x) (exp (* 10.0 (* x x)))))
(FPCore (x) :precision binary64 (* (cos x) (pow (* (pow (exp 10.0) (/ x 2.0)) (pow (sqrt (exp 10.0)) x)) x)))
double code(double x) {
return cos(x) * exp(10.0 * (x * x));
}
double code(double x) {
return cos(x) * pow((pow(exp(10.0), (x / 2.0)) * pow(sqrt(exp(10.0)), x)), x);
}



Bits error versus x
Results
Initial program 3.5
Applied add-log-exp_binary643.5
Applied exp-to-pow_binary643.1
Applied pow-unpow_binary641.3
Applied add-sqr-sqrt_binary641.8
Applied unpow-prod-down_binary641.1
Applied sqrt-pow2_binary640.7
Final simplification0.7
herbie shell --seed 2022095
(FPCore (x)
:name "ENA, Section 1.4, Exercise 1"
:precision binary64
:pre (and (<= 1.99 x) (<= x 2.01))
(* (cos x) (exp (* 10.0 (* x x)))))