Math FPCore C Java Python Julia MATLAB Wolfram TeX \[-\frac{1}{\frac{\pi}{4}} \cdot \log \left(\frac{e^{\frac{\pi}{4} \cdot f} + e^{-\frac{\pi}{4} \cdot f}}{e^{\frac{\pi}{4} \cdot f} - e^{-\frac{\pi}{4} \cdot f}}\right)
\]
↓
\[\begin{array}{l}
\mathbf{if}\;\frac{\pi}{4} \cdot f \leq 5 \cdot 10^{-12}:\\
\;\;\;\;-\frac{\frac{\log \left(\frac{4}{\pi \cdot f}\right)}{\pi}}{0.25}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{\pi}{4}} \cdot 0\\
\end{array}
\]
(FPCore (f)
:precision binary64
(-
(*
(/ 1.0 (/ PI 4.0))
(log
(/
(+ (exp (* (/ PI 4.0) f)) (exp (- (* (/ PI 4.0) f))))
(- (exp (* (/ PI 4.0) f)) (exp (- (* (/ PI 4.0) f))))))))) ↓
(FPCore (f)
:precision binary64
(if (<= (* (/ PI 4.0) f) 5e-12)
(- (/ (/ (log (/ 4.0 (* PI f))) PI) 0.25))
(* (/ 1.0 (/ PI 4.0)) 0.0))) double code(double f) {
return -((1.0 / (((double) M_PI) / 4.0)) * log(((exp(((((double) M_PI) / 4.0) * f)) + exp(-((((double) M_PI) / 4.0) * f))) / (exp(((((double) M_PI) / 4.0) * f)) - exp(-((((double) M_PI) / 4.0) * f))))));
}
↓
double code(double f) {
double tmp;
if (((((double) M_PI) / 4.0) * f) <= 5e-12) {
tmp = -((log((4.0 / (((double) M_PI) * f))) / ((double) M_PI)) / 0.25);
} else {
tmp = (1.0 / (((double) M_PI) / 4.0)) * 0.0;
}
return tmp;
}
public static double code(double f) {
return -((1.0 / (Math.PI / 4.0)) * Math.log(((Math.exp(((Math.PI / 4.0) * f)) + Math.exp(-((Math.PI / 4.0) * f))) / (Math.exp(((Math.PI / 4.0) * f)) - Math.exp(-((Math.PI / 4.0) * f))))));
}
↓
public static double code(double f) {
double tmp;
if (((Math.PI / 4.0) * f) <= 5e-12) {
tmp = -((Math.log((4.0 / (Math.PI * f))) / Math.PI) / 0.25);
} else {
tmp = (1.0 / (Math.PI / 4.0)) * 0.0;
}
return tmp;
}
def code(f):
return -((1.0 / (math.pi / 4.0)) * math.log(((math.exp(((math.pi / 4.0) * f)) + math.exp(-((math.pi / 4.0) * f))) / (math.exp(((math.pi / 4.0) * f)) - math.exp(-((math.pi / 4.0) * f))))))
↓
def code(f):
tmp = 0
if ((math.pi / 4.0) * f) <= 5e-12:
tmp = -((math.log((4.0 / (math.pi * f))) / math.pi) / 0.25)
else:
tmp = (1.0 / (math.pi / 4.0)) * 0.0
return tmp
function code(f)
return Float64(-Float64(Float64(1.0 / Float64(pi / 4.0)) * log(Float64(Float64(exp(Float64(Float64(pi / 4.0) * f)) + exp(Float64(-Float64(Float64(pi / 4.0) * f)))) / Float64(exp(Float64(Float64(pi / 4.0) * f)) - exp(Float64(-Float64(Float64(pi / 4.0) * f))))))))
end
↓
function code(f)
tmp = 0.0
if (Float64(Float64(pi / 4.0) * f) <= 5e-12)
tmp = Float64(-Float64(Float64(log(Float64(4.0 / Float64(pi * f))) / pi) / 0.25));
else
tmp = Float64(Float64(1.0 / Float64(pi / 4.0)) * 0.0);
end
return tmp
end
function tmp = code(f)
tmp = -((1.0 / (pi / 4.0)) * log(((exp(((pi / 4.0) * f)) + exp(-((pi / 4.0) * f))) / (exp(((pi / 4.0) * f)) - exp(-((pi / 4.0) * f))))));
end
↓
function tmp_2 = code(f)
tmp = 0.0;
if (((pi / 4.0) * f) <= 5e-12)
tmp = -((log((4.0 / (pi * f))) / pi) / 0.25);
else
tmp = (1.0 / (pi / 4.0)) * 0.0;
end
tmp_2 = tmp;
end
code[f_] := (-N[(N[(1.0 / N[(Pi / 4.0), $MachinePrecision]), $MachinePrecision] * N[Log[N[(N[(N[Exp[N[(N[(Pi / 4.0), $MachinePrecision] * f), $MachinePrecision]], $MachinePrecision] + N[Exp[(-N[(N[(Pi / 4.0), $MachinePrecision] * f), $MachinePrecision])], $MachinePrecision]), $MachinePrecision] / N[(N[Exp[N[(N[(Pi / 4.0), $MachinePrecision] * f), $MachinePrecision]], $MachinePrecision] - N[Exp[(-N[(N[(Pi / 4.0), $MachinePrecision] * f), $MachinePrecision])], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision])
↓
code[f_] := If[LessEqual[N[(N[(Pi / 4.0), $MachinePrecision] * f), $MachinePrecision], 5e-12], (-N[(N[(N[Log[N[(4.0 / N[(Pi * f), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / Pi), $MachinePrecision] / 0.25), $MachinePrecision]), N[(N[(1.0 / N[(Pi / 4.0), $MachinePrecision]), $MachinePrecision] * 0.0), $MachinePrecision]]
-\frac{1}{\frac{\pi}{4}} \cdot \log \left(\frac{e^{\frac{\pi}{4} \cdot f} + e^{-\frac{\pi}{4} \cdot f}}{e^{\frac{\pi}{4} \cdot f} - e^{-\frac{\pi}{4} \cdot f}}\right)
↓
\begin{array}{l}
\mathbf{if}\;\frac{\pi}{4} \cdot f \leq 5 \cdot 10^{-12}:\\
\;\;\;\;-\frac{\frac{\log \left(\frac{4}{\pi \cdot f}\right)}{\pi}}{0.25}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{\pi}{4}} \cdot 0\\
\end{array}