\[\left(\left(e^{x}\right) \bmod \left(\sqrt{\cos x}\right)\right) \cdot e^{-x}
\]
↓
\[\begin{array}{l}
t_0 := \left(\left(e^{x}\right) \bmod \left(\sqrt{\cos x}\right)\right)\\
t_1 := t_0 \cdot e^{-x}\\
t_2 := \mathsf{expm1}\left(\log t_0 - x\right)\\
t_3 := \mathsf{expm1}\left(-x\right)\\
t_4 := \frac{{t_3}^{2} + -1}{t_3 + -1}\\
\mathbf{if}\;t_1 \leq 0:\\
\;\;\;\;t_4\\
\mathbf{elif}\;t_1 \leq 2:\\
\;\;\;\;\frac{\log \left(e^{{t_2}^{2} + -1}\right)}{t_2 + -1}\\
\mathbf{else}:\\
\;\;\;\;t_4\\
\end{array}
\]
(FPCore (x) :precision binary64 (* (fmod (exp x) (sqrt (cos x))) (exp (- x))))
↓
(FPCore (x)
:precision binary64
(let* ((t_0 (fmod (exp x) (sqrt (cos x))))
(t_1 (* t_0 (exp (- x))))
(t_2 (expm1 (- (log t_0) x)))
(t_3 (expm1 (- x)))
(t_4 (/ (+ (pow t_3 2.0) -1.0) (+ t_3 -1.0))))
(if (<= t_1 0.0)
t_4
(if (<= t_1 2.0)
(/ (log (exp (+ (pow t_2 2.0) -1.0))) (+ t_2 -1.0))
t_4))))double code(double x) {
return fmod(exp(x), sqrt(cos(x))) * exp(-x);
}
↓
double code(double x) {
double t_0 = fmod(exp(x), sqrt(cos(x)));
double t_1 = t_0 * exp(-x);
double t_2 = expm1((log(t_0) - x));
double t_3 = expm1(-x);
double t_4 = (pow(t_3, 2.0) + -1.0) / (t_3 + -1.0);
double tmp;
if (t_1 <= 0.0) {
tmp = t_4;
} else if (t_1 <= 2.0) {
tmp = log(exp((pow(t_2, 2.0) + -1.0))) / (t_2 + -1.0);
} else {
tmp = t_4;
}
return tmp;
}
def code(x):
return math.fmod(math.exp(x), math.sqrt(math.cos(x))) * math.exp(-x)
↓
def code(x):
t_0 = math.fmod(math.exp(x), math.sqrt(math.cos(x)))
t_1 = t_0 * math.exp(-x)
t_2 = math.expm1((math.log(t_0) - x))
t_3 = math.expm1(-x)
t_4 = (math.pow(t_3, 2.0) + -1.0) / (t_3 + -1.0)
tmp = 0
if t_1 <= 0.0:
tmp = t_4
elif t_1 <= 2.0:
tmp = math.log(math.exp((math.pow(t_2, 2.0) + -1.0))) / (t_2 + -1.0)
else:
tmp = t_4
return tmp
function code(x)
return Float64(rem(exp(x), sqrt(cos(x))) * exp(Float64(-x)))
end
↓
function code(x)
t_0 = rem(exp(x), sqrt(cos(x)))
t_1 = Float64(t_0 * exp(Float64(-x)))
t_2 = expm1(Float64(log(t_0) - x))
t_3 = expm1(Float64(-x))
t_4 = Float64(Float64((t_3 ^ 2.0) + -1.0) / Float64(t_3 + -1.0))
tmp = 0.0
if (t_1 <= 0.0)
tmp = t_4;
elseif (t_1 <= 2.0)
tmp = Float64(log(exp(Float64((t_2 ^ 2.0) + -1.0))) / Float64(t_2 + -1.0));
else
tmp = t_4;
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_] := Block[{t$95$0 = N[With[{TMP1 = N[Exp[x], $MachinePrecision], TMP2 = N[Sqrt[N[Cos[x], $MachinePrecision]], $MachinePrecision]}, Mod[Abs[TMP1], Abs[TMP2]] * Sign[TMP1]], $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 * N[Exp[(-x)], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(Exp[N[(N[Log[t$95$0], $MachinePrecision] - x), $MachinePrecision]] - 1), $MachinePrecision]}, Block[{t$95$3 = N[(Exp[(-x)] - 1), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[Power[t$95$3, 2.0], $MachinePrecision] + -1.0), $MachinePrecision] / N[(t$95$3 + -1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 0.0], t$95$4, If[LessEqual[t$95$1, 2.0], N[(N[Log[N[Exp[N[(N[Power[t$95$2, 2.0], $MachinePrecision] + -1.0), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] / N[(t$95$2 + -1.0), $MachinePrecision]), $MachinePrecision], t$95$4]]]]]]]
\left(\left(e^{x}\right) \bmod \left(\sqrt{\cos x}\right)\right) \cdot e^{-x}
↓
\begin{array}{l}
t_0 := \left(\left(e^{x}\right) \bmod \left(\sqrt{\cos x}\right)\right)\\
t_1 := t_0 \cdot e^{-x}\\
t_2 := \mathsf{expm1}\left(\log t_0 - x\right)\\
t_3 := \mathsf{expm1}\left(-x\right)\\
t_4 := \frac{{t_3}^{2} + -1}{t_3 + -1}\\
\mathbf{if}\;t_1 \leq 0:\\
\;\;\;\;t_4\\
\mathbf{elif}\;t_1 \leq 2:\\
\;\;\;\;\frac{\log \left(e^{{t_2}^{2} + -1}\right)}{t_2 + -1}\\
\mathbf{else}:\\
\;\;\;\;t_4\\
\end{array}