\[0 \leq s \land s \leq 1.0651631\]
\[\frac{e^{\frac{-\left|x\right|}{s}}}{\left(s \cdot \left(1 + e^{\frac{-\left|x\right|}{s}}\right)\right) \cdot \left(1 + e^{\frac{-\left|x\right|}{s}}\right)}
\]
↓
\[\begin{array}{l}
t_0 := e^{\frac{\left|x\right|}{-s}}\\
\frac{t_0}{s \cdot e^{\mathsf{log1p}\left(t_0\right) \cdot 2}}
\end{array}
\]
(FPCore (x s)
:precision binary64
(/
(exp (/ (- (fabs x)) s))
(* (* s (+ 1.0 (exp (/ (- (fabs x)) s)))) (+ 1.0 (exp (/ (- (fabs x)) s))))))
↓
(FPCore (x s)
:precision binary64
(let* ((t_0 (exp (/ (fabs x) (- s)))))
(/ t_0 (* s (exp (* (log1p t_0) 2.0))))))
double code(double x, double s) {
return exp((-fabs(x) / s)) / ((s * (1.0 + exp((-fabs(x) / s)))) * (1.0 + exp((-fabs(x) / s))));
}
↓
double code(double x, double s) {
double t_0 = exp((fabs(x) / -s));
return t_0 / (s * exp((log1p(t_0) * 2.0)));
}
public static double code(double x, double s) {
return Math.exp((-Math.abs(x) / s)) / ((s * (1.0 + Math.exp((-Math.abs(x) / s)))) * (1.0 + Math.exp((-Math.abs(x) / s))));
}
↓
public static double code(double x, double s) {
double t_0 = Math.exp((Math.abs(x) / -s));
return t_0 / (s * Math.exp((Math.log1p(t_0) * 2.0)));
}
def code(x, s):
return math.exp((-math.fabs(x) / s)) / ((s * (1.0 + math.exp((-math.fabs(x) / s)))) * (1.0 + math.exp((-math.fabs(x) / s))))
↓
def code(x, s):
t_0 = math.exp((math.fabs(x) / -s))
return t_0 / (s * math.exp((math.log1p(t_0) * 2.0)))
function code(x, s)
return Float64(exp(Float64(Float64(-abs(x)) / s)) / Float64(Float64(s * Float64(1.0 + exp(Float64(Float64(-abs(x)) / s)))) * Float64(1.0 + exp(Float64(Float64(-abs(x)) / s)))))
end
↓
function code(x, s)
t_0 = exp(Float64(abs(x) / Float64(-s)))
return Float64(t_0 / Float64(s * exp(Float64(log1p(t_0) * 2.0))))
end
code[x_, s_] := N[(N[Exp[N[((-N[Abs[x], $MachinePrecision]) / s), $MachinePrecision]], $MachinePrecision] / N[(N[(s * N[(1.0 + N[Exp[N[((-N[Abs[x], $MachinePrecision]) / s), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 + N[Exp[N[((-N[Abs[x], $MachinePrecision]) / s), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
↓
code[x_, s_] := Block[{t$95$0 = N[Exp[N[(N[Abs[x], $MachinePrecision] / (-s)), $MachinePrecision]], $MachinePrecision]}, N[(t$95$0 / N[(s * N[Exp[N[(N[Log[1 + t$95$0], $MachinePrecision] * 2.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\frac{e^{\frac{-\left|x\right|}{s}}}{\left(s \cdot \left(1 + e^{\frac{-\left|x\right|}{s}}\right)\right) \cdot \left(1 + e^{\frac{-\left|x\right|}{s}}\right)}
↓
\begin{array}{l}
t_0 := e^{\frac{\left|x\right|}{-s}}\\
\frac{t_0}{s \cdot e^{\mathsf{log1p}\left(t_0\right) \cdot 2}}
\end{array}