\[\left(\left(e^{x}\right) \bmod \left(\sqrt{\cos x}\right)\right) \cdot e^{-x}
\]
↓
\[\begin{array}{l}
t_0 := \sqrt{\cos x}\\
t_1 := \left(\left(e^{x}\right) \bmod t_0\right)\\
t_2 := \frac{t_1}{e^{x}}\\
t_3 := e^{-x}\\
t_4 := t_1 \cdot t_3\\
\mathbf{if}\;t_4 \leq 0 \lor \neg \left(t_4 \leq 2\right):\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{-1 + {\left(1 + t_2\right)}^{2}}}{\frac{\sqrt{2 + t_2}}{\sqrt{\frac{\left(\left(e^{x}\right) \bmod \log \left(e^{t_0}\right)\right)}{e^{x}}}}}\\
\end{array}
\]
(FPCore (x) :precision binary64 (* (fmod (exp x) (sqrt (cos x))) (exp (- x))))
↓
(FPCore (x)
:precision binary64
(let* ((t_0 (sqrt (cos x)))
(t_1 (fmod (exp x) t_0))
(t_2 (/ t_1 (exp x)))
(t_3 (exp (- x)))
(t_4 (* t_1 t_3)))
(if (or (<= t_4 0.0) (not (<= t_4 2.0)))
t_3
(/
(sqrt (+ -1.0 (pow (+ 1.0 t_2) 2.0)))
(/
(sqrt (+ 2.0 t_2))
(sqrt (/ (fmod (exp x) (log (exp t_0))) (exp x))))))))double code(double x) {
return fmod(exp(x), sqrt(cos(x))) * exp(-x);
}
↓
double code(double x) {
double t_0 = sqrt(cos(x));
double t_1 = fmod(exp(x), t_0);
double t_2 = t_1 / exp(x);
double t_3 = exp(-x);
double t_4 = t_1 * t_3;
double tmp;
if ((t_4 <= 0.0) || !(t_4 <= 2.0)) {
tmp = t_3;
} else {
tmp = sqrt((-1.0 + pow((1.0 + t_2), 2.0))) / (sqrt((2.0 + t_2)) / sqrt((fmod(exp(x), log(exp(t_0))) / 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) :: t_0
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_0 = sqrt(cos(x))
t_1 = mod(exp(x), t_0)
t_2 = t_1 / exp(x)
t_3 = exp(-x)
t_4 = t_1 * t_3
if ((t_4 <= 0.0d0) .or. (.not. (t_4 <= 2.0d0))) then
tmp = t_3
else
tmp = sqrt(((-1.0d0) + ((1.0d0 + t_2) ** 2.0d0))) / (sqrt((2.0d0 + t_2)) / sqrt((mod(exp(x), log(exp(t_0))) / 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):
t_0 = math.sqrt(math.cos(x))
t_1 = math.fmod(math.exp(x), t_0)
t_2 = t_1 / math.exp(x)
t_3 = math.exp(-x)
t_4 = t_1 * t_3
tmp = 0
if (t_4 <= 0.0) or not (t_4 <= 2.0):
tmp = t_3
else:
tmp = math.sqrt((-1.0 + math.pow((1.0 + t_2), 2.0))) / (math.sqrt((2.0 + t_2)) / math.sqrt((math.fmod(math.exp(x), math.log(math.exp(t_0))) / math.exp(x))))
return tmp
function code(x)
return Float64(rem(exp(x), sqrt(cos(x))) * exp(Float64(-x)))
end
↓
function code(x)
t_0 = sqrt(cos(x))
t_1 = rem(exp(x), t_0)
t_2 = Float64(t_1 / exp(x))
t_3 = exp(Float64(-x))
t_4 = Float64(t_1 * t_3)
tmp = 0.0
if ((t_4 <= 0.0) || !(t_4 <= 2.0))
tmp = t_3;
else
tmp = Float64(sqrt(Float64(-1.0 + (Float64(1.0 + t_2) ^ 2.0))) / Float64(sqrt(Float64(2.0 + t_2)) / sqrt(Float64(rem(exp(x), log(exp(t_0))) / 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_] := Block[{t$95$0 = N[Sqrt[N[Cos[x], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[With[{TMP1 = N[Exp[x], $MachinePrecision], TMP2 = t$95$0}, Mod[Abs[TMP1], Abs[TMP2]] * Sign[TMP1]], $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / N[Exp[x], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Exp[(-x)], $MachinePrecision]}, Block[{t$95$4 = N[(t$95$1 * t$95$3), $MachinePrecision]}, If[Or[LessEqual[t$95$4, 0.0], N[Not[LessEqual[t$95$4, 2.0]], $MachinePrecision]], t$95$3, N[(N[Sqrt[N[(-1.0 + N[Power[N[(1.0 + t$95$2), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[Sqrt[N[(2.0 + t$95$2), $MachinePrecision]], $MachinePrecision] / N[Sqrt[N[(N[With[{TMP1 = N[Exp[x], $MachinePrecision], TMP2 = N[Log[N[Exp[t$95$0], $MachinePrecision]], $MachinePrecision]}, Mod[Abs[TMP1], Abs[TMP2]] * Sign[TMP1]], $MachinePrecision] / N[Exp[x], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\left(\left(e^{x}\right) \bmod \left(\sqrt{\cos x}\right)\right) \cdot e^{-x}
↓
\begin{array}{l}
t_0 := \sqrt{\cos x}\\
t_1 := \left(\left(e^{x}\right) \bmod t_0\right)\\
t_2 := \frac{t_1}{e^{x}}\\
t_3 := e^{-x}\\
t_4 := t_1 \cdot t_3\\
\mathbf{if}\;t_4 \leq 0 \lor \neg \left(t_4 \leq 2\right):\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{-1 + {\left(1 + t_2\right)}^{2}}}{\frac{\sqrt{2 + t_2}}{\sqrt{\frac{\left(\left(e^{x}\right) \bmod \log \left(e^{t_0}\right)\right)}{e^{x}}}}}\\
\end{array}
Alternatives
| Alternative 1 |
|---|
| Error | 23.0 |
|---|
| Cost | 187721 |
|---|
\[\begin{array}{l}
t_0 := \left(\left(e^{x}\right) \bmod \left(\sqrt{\cos x}\right)\right)\\
t_1 := \frac{t_0}{e^{x}}\\
t_2 := e^{-x}\\
t_3 := t_0 \cdot t_2\\
\mathbf{if}\;t_3 \leq 0 \lor \neg \left(t_3 \leq 2\right):\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{-1 + {\left(1 + t_1\right)}^{2}}}{\frac{\sqrt{2 + t_1}}{\sqrt{t_1}}}\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 23.0 |
|---|
| Cost | 135625 |
|---|
\[\begin{array}{l}
t_0 := \left(\left(e^{x}\right) \bmod \left(\sqrt{\cos x}\right)\right)\\
t_1 := e^{-x}\\
t_2 := t_0 \cdot t_1\\
\mathbf{if}\;t_2 \leq 0 \lor \neg \left(t_2 \leq 2\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;{\left({\left(\sqrt[3]{{\left(\sqrt[3]{\sqrt[3]{\frac{t_0}{e^{x}}}}\right)}^{3}}\right)}^{3}\right)}^{3}\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 23.0 |
|---|
| Cost | 116297 |
|---|
\[\begin{array}{l}
t_0 := \left(\left(e^{x}\right) \bmod \left(\sqrt{\cos x}\right)\right)\\
t_1 := e^{-x}\\
t_2 := t_0 \cdot t_1\\
\mathbf{if}\;t_2 \leq 0 \lor \neg \left(t_2 \leq 2\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;e^{{\left(\sqrt[3]{\log t_0 - x}\right)}^{3}}\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 23.0 |
|---|
| Cost | 97289 |
|---|
\[\begin{array}{l}
t_0 := \left(\left(e^{x}\right) \bmod \left(\sqrt{\cos x}\right)\right)\\
t_1 := e^{-x}\\
t_2 := t_0 \cdot t_1\\
\mathbf{if}\;t_2 \leq 0 \lor \neg \left(t_2 \leq 2\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;1 + \left(-1 + \frac{t_0}{e^{x}}\right)\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 23.0 |
|---|
| Cost | 97033 |
|---|
\[\begin{array}{l}
t_0 := \left(\left(e^{x}\right) \bmod \left(\sqrt{\cos x}\right)\right)\\
t_1 := e^{-x}\\
t_2 := t_0 \cdot t_1\\
\mathbf{if}\;t_2 \leq 0 \lor \neg \left(t_2 \leq 2\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{t_0}{e^{x}}\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 23.7 |
|---|
| Cost | 19588 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -1 \cdot 10^{-16}:\\
\;\;\;\;\frac{\left(\left(e^{x}\right) \bmod 1\right)}{e^{x}}\\
\mathbf{else}:\\
\;\;\;\;e^{-x}\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 24.4 |
|---|
| Cost | 6528 |
|---|
\[e^{-x}
\]