\[\left(\left(e^{x}\right) \bmod \left(\sqrt{\cos x}\right)\right) \cdot e^{-x}
\]
↓
\[\begin{array}{l}
\mathbf{if}\;x \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\frac{1}{2 - \frac{\left(\left(e^{x}\right) \bmod 1\right)}{e^{x}}} \cdot \left(1 - {\left(\mathsf{expm1}\left(-x\right)\right)}^{2}\right)\\
\mathbf{else}:\\
\;\;\;\;\log \left(e^{\frac{\left(\left(e^{x}\right) \bmod \left(\sqrt{\cos x}\right)\right)}{e^{x}}}\right)\\
\end{array}
\]
(FPCore (x) :precision binary64 (* (fmod (exp x) (sqrt (cos x))) (exp (- x))))
↓
(FPCore (x)
:precision binary64
(if (<= x -5e-310)
(*
(/ 1.0 (- 2.0 (/ (fmod (exp x) 1.0) (exp x))))
(- 1.0 (pow (expm1 (- x)) 2.0)))
(log (exp (/ (fmod (exp x) (sqrt (cos x))) (exp x))))))double code(double x) {
return fmod(exp(x), sqrt(cos(x))) * exp(-x);
}
↓
double code(double x) {
double tmp;
if (x <= -5e-310) {
tmp = (1.0 / (2.0 - (fmod(exp(x), 1.0) / exp(x)))) * (1.0 - pow(expm1(-x), 2.0));
} else {
tmp = log(exp((fmod(exp(x), sqrt(cos(x))) / exp(x))));
}
return tmp;
}
def code(x):
return math.fmod(math.exp(x), math.sqrt(math.cos(x))) * math.exp(-x)
↓
def code(x):
tmp = 0
if x <= -5e-310:
tmp = (1.0 / (2.0 - (math.fmod(math.exp(x), 1.0) / math.exp(x)))) * (1.0 - math.pow(math.expm1(-x), 2.0))
else:
tmp = math.log(math.exp((math.fmod(math.exp(x), math.sqrt(math.cos(x))) / math.exp(x))))
return tmp
function code(x)
return Float64(rem(exp(x), sqrt(cos(x))) * exp(Float64(-x)))
end
↓
function code(x)
tmp = 0.0
if (x <= -5e-310)
tmp = Float64(Float64(1.0 / Float64(2.0 - Float64(rem(exp(x), 1.0) / exp(x)))) * Float64(1.0 - (expm1(Float64(-x)) ^ 2.0)));
else
tmp = log(exp(Float64(rem(exp(x), sqrt(cos(x))) / exp(x))));
end
return tmp
end
code[x_] := N[(N[With[{TMP1 = N[Exp[x], $MachinePrecision], TMP2 = N[Sqrt[N[Cos[x], $MachinePrecision]], $MachinePrecision]}, Mod[Abs[TMP1], Abs[TMP2]] * Sign[TMP1]], $MachinePrecision] * N[Exp[(-x)], $MachinePrecision]), $MachinePrecision]
↓
code[x_] := If[LessEqual[x, -5e-310], N[(N[(1.0 / N[(2.0 - N[(N[With[{TMP1 = N[Exp[x], $MachinePrecision], TMP2 = 1.0}, Mod[Abs[TMP1], Abs[TMP2]] * Sign[TMP1]], $MachinePrecision] / N[Exp[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 - N[Power[N[(Exp[(-x)] - 1), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[Log[N[Exp[N[(N[With[{TMP1 = N[Exp[x], $MachinePrecision], TMP2 = N[Sqrt[N[Cos[x], $MachinePrecision]], $MachinePrecision]}, Mod[Abs[TMP1], Abs[TMP2]] * Sign[TMP1]], $MachinePrecision] / N[Exp[x], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision]]
\left(\left(e^{x}\right) \bmod \left(\sqrt{\cos x}\right)\right) \cdot e^{-x}
↓
\begin{array}{l}
\mathbf{if}\;x \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\frac{1}{2 - \frac{\left(\left(e^{x}\right) \bmod 1\right)}{e^{x}}} \cdot \left(1 - {\left(\mathsf{expm1}\left(-x\right)\right)}^{2}\right)\\
\mathbf{else}:\\
\;\;\;\;\log \left(e^{\frac{\left(\left(e^{x}\right) \bmod \left(\sqrt{\cos x}\right)\right)}{e^{x}}}\right)\\
\end{array}