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