Math FPCore C Fortran Java Python Julia MATLAB Wolfram TeX \[\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}
\]
↓
\[\begin{array}{l}
t_0 := \frac{e^{-y}}{x}\\
t_1 := \frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\\
\mathbf{if}\;t_1 \leq -1000000:\\
\;\;\;\;\frac{1}{x}\\
\mathbf{elif}\;t_1 \leq -1 \cdot 10^{-308}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;\left(0 - \left(-1 - \frac{1}{x}\right)\right) - 1\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{-10}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(\frac{x}{y + x}\right)}^{x}}{x}\\
\end{array}
\]
(FPCore (x y) :precision binary64 (/ (exp (* x (log (/ x (+ x y))))) x)) ↓
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (exp (- y)) x)) (t_1 (/ (exp (* x (log (/ x (+ x y))))) x)))
(if (<= t_1 -1000000.0)
(/ 1.0 x)
(if (<= t_1 -1e-308)
t_0
(if (<= t_1 0.0)
(- (- 0.0 (- -1.0 (/ 1.0 x))) 1.0)
(if (<= t_1 5e-10) t_0 (/ (pow (/ x (+ y x)) x) x))))))) double code(double x, double y) {
return exp((x * log((x / (x + y))))) / x;
}
↓
double code(double x, double y) {
double t_0 = exp(-y) / x;
double t_1 = exp((x * log((x / (x + y))))) / x;
double tmp;
if (t_1 <= -1000000.0) {
tmp = 1.0 / x;
} else if (t_1 <= -1e-308) {
tmp = t_0;
} else if (t_1 <= 0.0) {
tmp = (0.0 - (-1.0 - (1.0 / x))) - 1.0;
} else if (t_1 <= 5e-10) {
tmp = t_0;
} else {
tmp = pow((x / (y + x)), x) / x;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = exp((x * log((x / (x + y))))) / x
end function
↓
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = exp(-y) / x
t_1 = exp((x * log((x / (x + y))))) / x
if (t_1 <= (-1000000.0d0)) then
tmp = 1.0d0 / x
else if (t_1 <= (-1d-308)) then
tmp = t_0
else if (t_1 <= 0.0d0) then
tmp = (0.0d0 - ((-1.0d0) - (1.0d0 / x))) - 1.0d0
else if (t_1 <= 5d-10) then
tmp = t_0
else
tmp = ((x / (y + x)) ** x) / x
end if
code = tmp
end function
public static double code(double x, double y) {
return Math.exp((x * Math.log((x / (x + y))))) / x;
}
↓
public static double code(double x, double y) {
double t_0 = Math.exp(-y) / x;
double t_1 = Math.exp((x * Math.log((x / (x + y))))) / x;
double tmp;
if (t_1 <= -1000000.0) {
tmp = 1.0 / x;
} else if (t_1 <= -1e-308) {
tmp = t_0;
} else if (t_1 <= 0.0) {
tmp = (0.0 - (-1.0 - (1.0 / x))) - 1.0;
} else if (t_1 <= 5e-10) {
tmp = t_0;
} else {
tmp = Math.pow((x / (y + x)), x) / x;
}
return tmp;
}
def code(x, y):
return math.exp((x * math.log((x / (x + y))))) / x
↓
def code(x, y):
t_0 = math.exp(-y) / x
t_1 = math.exp((x * math.log((x / (x + y))))) / x
tmp = 0
if t_1 <= -1000000.0:
tmp = 1.0 / x
elif t_1 <= -1e-308:
tmp = t_0
elif t_1 <= 0.0:
tmp = (0.0 - (-1.0 - (1.0 / x))) - 1.0
elif t_1 <= 5e-10:
tmp = t_0
else:
tmp = math.pow((x / (y + x)), x) / x
return tmp
function code(x, y)
return Float64(exp(Float64(x * log(Float64(x / Float64(x + y))))) / x)
end
↓
function code(x, y)
t_0 = Float64(exp(Float64(-y)) / x)
t_1 = Float64(exp(Float64(x * log(Float64(x / Float64(x + y))))) / x)
tmp = 0.0
if (t_1 <= -1000000.0)
tmp = Float64(1.0 / x);
elseif (t_1 <= -1e-308)
tmp = t_0;
elseif (t_1 <= 0.0)
tmp = Float64(Float64(0.0 - Float64(-1.0 - Float64(1.0 / x))) - 1.0);
elseif (t_1 <= 5e-10)
tmp = t_0;
else
tmp = Float64((Float64(x / Float64(y + x)) ^ x) / x);
end
return tmp
end
function tmp = code(x, y)
tmp = exp((x * log((x / (x + y))))) / x;
end
↓
function tmp_2 = code(x, y)
t_0 = exp(-y) / x;
t_1 = exp((x * log((x / (x + y))))) / x;
tmp = 0.0;
if (t_1 <= -1000000.0)
tmp = 1.0 / x;
elseif (t_1 <= -1e-308)
tmp = t_0;
elseif (t_1 <= 0.0)
tmp = (0.0 - (-1.0 - (1.0 / x))) - 1.0;
elseif (t_1 <= 5e-10)
tmp = t_0;
else
tmp = ((x / (y + x)) ^ x) / x;
end
tmp_2 = tmp;
end
code[x_, y_] := N[(N[Exp[N[(x * N[Log[N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / x), $MachinePrecision]
↓
code[x_, y_] := Block[{t$95$0 = N[(N[Exp[(-y)], $MachinePrecision] / x), $MachinePrecision]}, Block[{t$95$1 = N[(N[Exp[N[(x * N[Log[N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / x), $MachinePrecision]}, If[LessEqual[t$95$1, -1000000.0], N[(1.0 / x), $MachinePrecision], If[LessEqual[t$95$1, -1e-308], t$95$0, If[LessEqual[t$95$1, 0.0], N[(N[(0.0 - N[(-1.0 - N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 1.0), $MachinePrecision], If[LessEqual[t$95$1, 5e-10], t$95$0, N[(N[Power[N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision], x], $MachinePrecision] / x), $MachinePrecision]]]]]]]
\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}
↓
\begin{array}{l}
t_0 := \frac{e^{-y}}{x}\\
t_1 := \frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}\\
\mathbf{if}\;t_1 \leq -1000000:\\
\;\;\;\;\frac{1}{x}\\
\mathbf{elif}\;t_1 \leq -1 \cdot 10^{-308}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;\left(0 - \left(-1 - \frac{1}{x}\right)\right) - 1\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{-10}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\frac{{\left(\frac{x}{y + x}\right)}^{x}}{x}\\
\end{array}