\left(\left(e^{x}\right) \bmod \left(\sqrt{\cos x}\right)\right) \cdot e^{-x}\begin{array}{l}
\mathbf{if}\;x \leq 2.6134317790376 \cdot 10^{-310}:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq 163559103.077314:\\
\;\;\;\;\sqrt[3]{\sqrt[3]{e^{\left(\log \left(\left(e^{x}\right) \bmod \left(\sqrt{\cos x}\right)\right) - x\right) \cdot 9}}}\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}(FPCore (x) :precision binary64 (* (fmod (exp x) (sqrt (cos x))) (exp (- x))))
(FPCore (x)
:precision binary64
(if (<= x 2.6134317790376e-310)
1.0
(if (<= x 163559103.077314)
(cbrt (cbrt (exp (* (- (log (fmod (exp x) (sqrt (cos x)))) x) 9.0))))
0.0)))double code(double x) {
return fmod(exp(x), sqrt(cos(x))) * exp(-x);
}
double code(double x) {
double tmp;
if (x <= 2.6134317790376e-310) {
tmp = 1.0;
} else if (x <= 163559103.077314) {
tmp = cbrt(cbrt(exp((log(fmod(exp(x), sqrt(cos(x)))) - x) * 9.0)));
} else {
tmp = 0.0;
}
return tmp;
}








Bits error versus x
| Alternative 1 | |
|---|---|
| Error | 23.6 |
| Cost | 77569 |
| Alternative 2 | |
|---|---|
| Error | 23.8 |
| Cost | 52162 |
| Alternative 3 | |
|---|---|
| Error | 23.8 |
| Cost | 32898 |
| Alternative 4 | |
|---|---|
| Error | 24.3 |
| Cost | 385 |
| Alternative 5 | |
|---|---|
| Error | 49.2 |
| Cost | 64 |

if x < 2.613431779037581e-310Initial program 0
Simplified0
if 2.613431779037581e-310 < x < 163559103.077313989Initial program 58.8
Simplified58.8
rmApplied add-cbrt-cube_binary64_113758.8
Simplified58.8
rmApplied add-cbrt-cube_binary64_113758.8
Simplified58.8
rmApplied pow-to-exp_binary64_117058.8
Simplified58.8
Simplified58.8
if 163559103.077313989 < x Initial program 0
Simplified0
Final simplification23.8
herbie shell --seed 2021014
(FPCore (x)
:name "expfmod"
:precision binary64
(* (fmod (exp x) (sqrt (cos x))) (exp (- x))))