Math FPCore C Fortran Python Julia Wolfram TeX \[\left(\left(e^{x}\right) \bmod \left(\sqrt{\cos x}\right)\right) \cdot e^{-x}
\]
↓
\[\begin{array}{l}
\mathbf{if}\;x \leq -4.820084872909202 \cdot 10^{-299}:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq 0.5186950637553355:\\
\;\;\;\;\left(1 + \frac{\left(\left(e^{x}\right) \bmod \left(\sqrt{\cos x}\right)\right)}{e^{x}}\right) + -1\\
\mathbf{else}:\\
\;\;\;\;e^{-x}\\
\end{array}
\]
(FPCore (x) :precision binary64 (* (fmod (exp x) (sqrt (cos x))) (exp (- x)))) ↓
(FPCore (x)
:precision binary64
(if (<= x -4.820084872909202e-299)
1.0
(if (<= x 0.5186950637553355)
(+ (+ 1.0 (/ (fmod (exp x) (sqrt (cos x))) (exp x))) -1.0)
(exp (- x))))) double code(double x) {
return fmod(exp(x), sqrt(cos(x))) * exp(-x);
}
↓
double code(double x) {
double tmp;
if (x <= -4.820084872909202e-299) {
tmp = 1.0;
} else if (x <= 0.5186950637553355) {
tmp = (1.0 + (fmod(exp(x), sqrt(cos(x))) / exp(x))) + -1.0;
} else {
tmp = exp(-x);
}
return tmp;
}
real(8) function code(x)
real(8), intent (in) :: x
code = mod(exp(x), sqrt(cos(x))) * exp(-x)
end function
↓
real(8) function code(x)
real(8), intent (in) :: x
real(8) :: tmp
if (x <= (-4.820084872909202d-299)) then
tmp = 1.0d0
else if (x <= 0.5186950637553355d0) then
tmp = (1.0d0 + (mod(exp(x), sqrt(cos(x))) / exp(x))) + (-1.0d0)
else
tmp = exp(-x)
end if
code = tmp
end function
def code(x):
return math.fmod(math.exp(x), math.sqrt(math.cos(x))) * math.exp(-x)
↓
def code(x):
tmp = 0
if x <= -4.820084872909202e-299:
tmp = 1.0
elif x <= 0.5186950637553355:
tmp = (1.0 + (math.fmod(math.exp(x), math.sqrt(math.cos(x))) / math.exp(x))) + -1.0
else:
tmp = 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 <= -4.820084872909202e-299)
tmp = 1.0;
elseif (x <= 0.5186950637553355)
tmp = Float64(Float64(1.0 + Float64(rem(exp(x), sqrt(cos(x))) / exp(x))) + -1.0);
else
tmp = exp(Float64(-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, -4.820084872909202e-299], 1.0, If[LessEqual[x, 0.5186950637553355], N[(N[(1.0 + 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] + -1.0), $MachinePrecision], N[Exp[(-x)], $MachinePrecision]]]
\left(\left(e^{x}\right) \bmod \left(\sqrt{\cos x}\right)\right) \cdot e^{-x}
↓
\begin{array}{l}
\mathbf{if}\;x \leq -4.820084872909202 \cdot 10^{-299}:\\
\;\;\;\;1\\
\mathbf{elif}\;x \leq 0.5186950637553355:\\
\;\;\;\;\left(1 + \frac{\left(\left(e^{x}\right) \bmod \left(\sqrt{\cos x}\right)\right)}{e^{x}}\right) + -1\\
\mathbf{else}:\\
\;\;\;\;e^{-x}\\
\end{array}