\cos x \cdot e^{10 \cdot \left(x \cdot x\right)}
\begin{array}{l}
t_0 := {\left({\left(e^{x}\right)}^{\left(\frac{x}{2}\right)}\right)}^{5}\\
\cos x \cdot \left(t_0 \cdot \left(t_0 \cdot {\left({\left(e^{x}\right)}^{x}\right)}^{5}\right)\right)
\end{array}
(FPCore (x) :precision binary64 (* (cos x) (exp (* 10.0 (* x x)))))
(FPCore (x) :precision binary64 (let* ((t_0 (pow (pow (exp x) (/ x 2.0)) 5.0))) (* (cos x) (* t_0 (* t_0 (pow (pow (exp x) x) 5.0))))))
double code(double x) {
return cos(x) * exp((10.0 * (x * x)));
}
double code(double x) {
double t_0 = pow(pow(exp(x), (x / 2.0)), 5.0);
return cos(x) * (t_0 * (t_0 * pow(pow(exp(x), x), 5.0)));
}



Bits error versus x
Results
Initial program 3.5
Applied add-sqr-sqrt_binary643.5
Simplified3.1
Simplified3.0
Applied add-log-exp_binary643.0
Applied exp-to-pow_binary642.3
Applied add-log-exp_binary642.3
Applied exp-to-pow_binary642.1
Applied sqr-pow_binary642.2
Applied unpow-prod-down_binary642.2
Applied associate-*l*_binary642.2
Final simplification2.2
herbie shell --seed 2022125
(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)))))