Math FPCore C Fortran Java Python Julia MATLAB Wolfram TeX \[\left(x \cdot y\right) \cdot \left(1 - y\right)
\]
↓
\[\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{+160}:\\
\;\;\;\;\frac{y \cdot x}{\frac{-1}{y}}\\
\mathbf{elif}\;y \leq 10^{+65}:\\
\;\;\;\;x \cdot \left(y \cdot \left(1 - y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\frac{\frac{-1}{y}}{x}}\\
\end{array}
\]
(FPCore (x y) :precision binary64 (* (* x y) (- 1.0 y))) ↓
(FPCore (x y)
:precision binary64
(if (<= y -1e+160)
(/ (* y x) (/ -1.0 y))
(if (<= y 1e+65) (* x (* y (- 1.0 y))) (/ y (/ (/ -1.0 y) x))))) double code(double x, double y) {
return (x * y) * (1.0 - y);
}
↓
double code(double x, double y) {
double tmp;
if (y <= -1e+160) {
tmp = (y * x) / (-1.0 / y);
} else if (y <= 1e+65) {
tmp = x * (y * (1.0 - y));
} else {
tmp = y / ((-1.0 / y) / x);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (x * y) * (1.0d0 - y)
end function
↓
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-1d+160)) then
tmp = (y * x) / ((-1.0d0) / y)
else if (y <= 1d+65) then
tmp = x * (y * (1.0d0 - y))
else
tmp = y / (((-1.0d0) / y) / x)
end if
code = tmp
end function
public static double code(double x, double y) {
return (x * y) * (1.0 - y);
}
↓
public static double code(double x, double y) {
double tmp;
if (y <= -1e+160) {
tmp = (y * x) / (-1.0 / y);
} else if (y <= 1e+65) {
tmp = x * (y * (1.0 - y));
} else {
tmp = y / ((-1.0 / y) / x);
}
return tmp;
}
def code(x, y):
return (x * y) * (1.0 - y)
↓
def code(x, y):
tmp = 0
if y <= -1e+160:
tmp = (y * x) / (-1.0 / y)
elif y <= 1e+65:
tmp = x * (y * (1.0 - y))
else:
tmp = y / ((-1.0 / y) / x)
return tmp
function code(x, y)
return Float64(Float64(x * y) * Float64(1.0 - y))
end
↓
function code(x, y)
tmp = 0.0
if (y <= -1e+160)
tmp = Float64(Float64(y * x) / Float64(-1.0 / y));
elseif (y <= 1e+65)
tmp = Float64(x * Float64(y * Float64(1.0 - y)));
else
tmp = Float64(y / Float64(Float64(-1.0 / y) / x));
end
return tmp
end
function tmp = code(x, y)
tmp = (x * y) * (1.0 - y);
end
↓
function tmp_2 = code(x, y)
tmp = 0.0;
if (y <= -1e+160)
tmp = (y * x) / (-1.0 / y);
elseif (y <= 1e+65)
tmp = x * (y * (1.0 - y));
else
tmp = y / ((-1.0 / y) / x);
end
tmp_2 = tmp;
end
code[x_, y_] := N[(N[(x * y), $MachinePrecision] * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_] := If[LessEqual[y, -1e+160], N[(N[(y * x), $MachinePrecision] / N[(-1.0 / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1e+65], N[(x * N[(y * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y / N[(N[(-1.0 / y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]
\left(x \cdot y\right) \cdot \left(1 - y\right)
↓
\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{+160}:\\
\;\;\;\;\frac{y \cdot x}{\frac{-1}{y}}\\
\mathbf{elif}\;y \leq 10^{+65}:\\
\;\;\;\;x \cdot \left(y \cdot \left(1 - y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\frac{\frac{-1}{y}}{x}}\\
\end{array}