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}
\mathbf{if}\;x \leq -1 \cdot 10^{+21} \lor \neg \left(x \leq 1.3 \cdot 10^{-31}\right):\\
\;\;\;\;\frac{e^{-y}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{x}\\
\end{array}
\]
(FPCore (x y) :precision binary64 (/ (exp (* x (log (/ x (+ x y))))) x)) ↓
(FPCore (x y)
:precision binary64
(if (or (<= x -1e+21) (not (<= x 1.3e-31))) (/ (exp (- y)) x) (/ 1.0 x))) double code(double x, double y) {
return exp((x * log((x / (x + y))))) / x;
}
↓
double code(double x, double y) {
double tmp;
if ((x <= -1e+21) || !(x <= 1.3e-31)) {
tmp = exp(-y) / x;
} else {
tmp = 1.0 / 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) :: tmp
if ((x <= (-1d+21)) .or. (.not. (x <= 1.3d-31))) then
tmp = exp(-y) / x
else
tmp = 1.0d0 / 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 tmp;
if ((x <= -1e+21) || !(x <= 1.3e-31)) {
tmp = Math.exp(-y) / x;
} else {
tmp = 1.0 / x;
}
return tmp;
}
def code(x, y):
return math.exp((x * math.log((x / (x + y))))) / x
↓
def code(x, y):
tmp = 0
if (x <= -1e+21) or not (x <= 1.3e-31):
tmp = math.exp(-y) / x
else:
tmp = 1.0 / x
return tmp
function code(x, y)
return Float64(exp(Float64(x * log(Float64(x / Float64(x + y))))) / x)
end
↓
function code(x, y)
tmp = 0.0
if ((x <= -1e+21) || !(x <= 1.3e-31))
tmp = Float64(exp(Float64(-y)) / x);
else
tmp = Float64(1.0 / 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)
tmp = 0.0;
if ((x <= -1e+21) || ~((x <= 1.3e-31)))
tmp = exp(-y) / x;
else
tmp = 1.0 / 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_] := If[Or[LessEqual[x, -1e+21], N[Not[LessEqual[x, 1.3e-31]], $MachinePrecision]], N[(N[Exp[(-y)], $MachinePrecision] / x), $MachinePrecision], N[(1.0 / x), $MachinePrecision]]
\frac{e^{x \cdot \log \left(\frac{x}{x + y}\right)}}{x}
↓
\begin{array}{l}
\mathbf{if}\;x \leq -1 \cdot 10^{+21} \lor \neg \left(x \leq 1.3 \cdot 10^{-31}\right):\\
\;\;\;\;\frac{e^{-y}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{x}\\
\end{array}