\left(\left(e^{x}\right) \bmod \left(\sqrt{\cos x}\right)\right) \cdot e^{-x}e^{\log \left(\left(e^{x}\right) \bmod \left(1 - \left(x \cdot x\right) \cdot 0.25\right)\right) - x}(FPCore (x) :precision binary64 (* (fmod (exp x) (sqrt (cos x))) (exp (- x))))
(FPCore (x) :precision binary64 (exp (- (log (fmod (exp x) (- 1.0 (* (* x x) 0.25)))) x)))
double code(double x) {
return fmod(exp(x), sqrt(cos(x))) * exp(-x);
}
double code(double x) {
return exp(log(fmod(exp(x), (1.0 - ((x * x) * 0.25)))) - x);
}



Bits error versus x
Initial program 59.9
Simplified59.9
Taylor expanded around 0 60.0
Simplified60.0
rmApplied add-exp-log_binary64_79860.0
Applied div-exp_binary64_81160.0
Final simplification60.0
herbie shell --seed 2021007
(FPCore (x)
:name "expfmod"
:precision binary64
(* (fmod (exp x) (sqrt (cos x))) (exp (- x))))