Math FPCore C Java Python Julia Wolfram TeX \[\frac{\tan \left(\frac{x}{y \cdot 2}\right)}{\sin \left(\frac{x}{y \cdot 2}\right)}
\]
↓
\[\begin{array}{l}
t_0 := \frac{x}{y \cdot 2}\\
\mathbf{if}\;t_0 \leq -1 \cdot 10^{+33}:\\
\;\;\;\;1\\
\mathbf{elif}\;t_0 \leq 5 \cdot 10^{+88}:\\
\;\;\;\;\frac{1}{\cos \left({\left(y \cdot \frac{1}{x \cdot 0.5}\right)}^{-1}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{0.5}{\frac{y}{x}}\right)\right)\right)}\\
\end{array}
\]
(FPCore (x y)
:precision binary64
(/ (tan (/ x (* y 2.0))) (sin (/ x (* y 2.0))))) ↓
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ x (* y 2.0))))
(if (<= t_0 -1e+33)
1.0
(if (<= t_0 5e+88)
(/ 1.0 (cos (pow (* y (/ 1.0 (* x 0.5))) -1.0)))
(/ 1.0 (cos (expm1 (log1p (/ 0.5 (/ y x)))))))))) double code(double x, double y) {
return tan((x / (y * 2.0))) / sin((x / (y * 2.0)));
}
↓
double code(double x, double y) {
double t_0 = x / (y * 2.0);
double tmp;
if (t_0 <= -1e+33) {
tmp = 1.0;
} else if (t_0 <= 5e+88) {
tmp = 1.0 / cos(pow((y * (1.0 / (x * 0.5))), -1.0));
} else {
tmp = 1.0 / cos(expm1(log1p((0.5 / (y / x)))));
}
return tmp;
}
public static double code(double x, double y) {
return Math.tan((x / (y * 2.0))) / Math.sin((x / (y * 2.0)));
}
↓
public static double code(double x, double y) {
double t_0 = x / (y * 2.0);
double tmp;
if (t_0 <= -1e+33) {
tmp = 1.0;
} else if (t_0 <= 5e+88) {
tmp = 1.0 / Math.cos(Math.pow((y * (1.0 / (x * 0.5))), -1.0));
} else {
tmp = 1.0 / Math.cos(Math.expm1(Math.log1p((0.5 / (y / x)))));
}
return tmp;
}
def code(x, y):
return math.tan((x / (y * 2.0))) / math.sin((x / (y * 2.0)))
↓
def code(x, y):
t_0 = x / (y * 2.0)
tmp = 0
if t_0 <= -1e+33:
tmp = 1.0
elif t_0 <= 5e+88:
tmp = 1.0 / math.cos(math.pow((y * (1.0 / (x * 0.5))), -1.0))
else:
tmp = 1.0 / math.cos(math.expm1(math.log1p((0.5 / (y / x)))))
return tmp
function code(x, y)
return Float64(tan(Float64(x / Float64(y * 2.0))) / sin(Float64(x / Float64(y * 2.0))))
end
↓
function code(x, y)
t_0 = Float64(x / Float64(y * 2.0))
tmp = 0.0
if (t_0 <= -1e+33)
tmp = 1.0;
elseif (t_0 <= 5e+88)
tmp = Float64(1.0 / cos((Float64(y * Float64(1.0 / Float64(x * 0.5))) ^ -1.0)));
else
tmp = Float64(1.0 / cos(expm1(log1p(Float64(0.5 / Float64(y / x))))));
end
return tmp
end
code[x_, y_] := N[(N[Tan[N[(x / N[(y * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[Sin[N[(x / N[(y * 2.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_] := Block[{t$95$0 = N[(x / N[(y * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -1e+33], 1.0, If[LessEqual[t$95$0, 5e+88], N[(1.0 / N[Cos[N[Power[N[(y * N[(1.0 / N[(x * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], -1.0], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(1.0 / N[Cos[N[(Exp[N[Log[1 + N[(0.5 / N[(y / x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]]]
\frac{\tan \left(\frac{x}{y \cdot 2}\right)}{\sin \left(\frac{x}{y \cdot 2}\right)}
↓
\begin{array}{l}
t_0 := \frac{x}{y \cdot 2}\\
\mathbf{if}\;t_0 \leq -1 \cdot 10^{+33}:\\
\;\;\;\;1\\
\mathbf{elif}\;t_0 \leq 5 \cdot 10^{+88}:\\
\;\;\;\;\frac{1}{\cos \left({\left(y \cdot \frac{1}{x \cdot 0.5}\right)}^{-1}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\cos \left(\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{0.5}{\frac{y}{x}}\right)\right)\right)}\\
\end{array}