Math FPCore C Fortran Java Python Julia MATLAB Wolfram TeX \[\frac{\left(x \cdot 2\right) \cdot y}{x - y}
\]
↓
\[\begin{array}{l}
t_0 := \frac{y \cdot \left(2 \cdot x\right)}{x - y}\\
\mathbf{if}\;y \leq -20000:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;y \ne 0:\\
\;\;\;\;\frac{x}{\frac{x - y}{y \cdot 2}}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}\\
\mathbf{elif}\;y \leq 10^{-103}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;x \ne 0:\\
\;\;\;\;\frac{y \cdot 2}{\frac{x - y}{x}}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}\\
\mathbf{elif}\;y \ne 0:\\
\;\;\;\;\frac{x + x}{\frac{x}{y} - 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(y + y\right) \cdot x}{x - y}\\
\end{array}
\]
(FPCore (x y) :precision binary64 (/ (* (* x 2.0) y) (- x y))) ↓
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ (* y (* 2.0 x)) (- x y))))
(if (<= y -20000.0)
(if (!= y 0.0) (/ x (/ (- x y) (* y 2.0))) t_0)
(if (<= y 1e-103)
(if (!= x 0.0) (/ (* y 2.0) (/ (- x y) x)) t_0)
(if (!= y 0.0)
(/ (+ x x) (- (/ x y) 1.0))
(/ (* (+ y y) x) (- x y))))))) double code(double x, double y) {
return ((x * 2.0) * y) / (x - y);
}
↓
double code(double x, double y) {
double t_0 = (y * (2.0 * x)) / (x - y);
double tmp_1;
if (y <= -20000.0) {
double tmp_2;
if (y != 0.0) {
tmp_2 = x / ((x - y) / (y * 2.0));
} else {
tmp_2 = t_0;
}
tmp_1 = tmp_2;
} else if (y <= 1e-103) {
double tmp_3;
if (x != 0.0) {
tmp_3 = (y * 2.0) / ((x - y) / x);
} else {
tmp_3 = t_0;
}
tmp_1 = tmp_3;
} else if (y != 0.0) {
tmp_1 = (x + x) / ((x / y) - 1.0);
} else {
tmp_1 = ((y + y) * x) / (x - y);
}
return tmp_1;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = ((x * 2.0d0) * y) / (x - y)
end function
↓
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
real(8) :: tmp_1
real(8) :: tmp_2
real(8) :: tmp_3
t_0 = (y * (2.0d0 * x)) / (x - y)
if (y <= (-20000.0d0)) then
if (y /= 0.0d0) then
tmp_2 = x / ((x - y) / (y * 2.0d0))
else
tmp_2 = t_0
end if
tmp_1 = tmp_2
else if (y <= 1d-103) then
if (x /= 0.0d0) then
tmp_3 = (y * 2.0d0) / ((x - y) / x)
else
tmp_3 = t_0
end if
tmp_1 = tmp_3
else if (y /= 0.0d0) then
tmp_1 = (x + x) / ((x / y) - 1.0d0)
else
tmp_1 = ((y + y) * x) / (x - y)
end if
code = tmp_1
end function
public static double code(double x, double y) {
return ((x * 2.0) * y) / (x - y);
}
↓
public static double code(double x, double y) {
double t_0 = (y * (2.0 * x)) / (x - y);
double tmp_1;
if (y <= -20000.0) {
double tmp_2;
if (y != 0.0) {
tmp_2 = x / ((x - y) / (y * 2.0));
} else {
tmp_2 = t_0;
}
tmp_1 = tmp_2;
} else if (y <= 1e-103) {
double tmp_3;
if (x != 0.0) {
tmp_3 = (y * 2.0) / ((x - y) / x);
} else {
tmp_3 = t_0;
}
tmp_1 = tmp_3;
} else if (y != 0.0) {
tmp_1 = (x + x) / ((x / y) - 1.0);
} else {
tmp_1 = ((y + y) * x) / (x - y);
}
return tmp_1;
}
def code(x, y):
return ((x * 2.0) * y) / (x - y)
↓
def code(x, y):
t_0 = (y * (2.0 * x)) / (x - y)
tmp_1 = 0
if y <= -20000.0:
tmp_2 = 0
if y != 0.0:
tmp_2 = x / ((x - y) / (y * 2.0))
else:
tmp_2 = t_0
tmp_1 = tmp_2
elif y <= 1e-103:
tmp_3 = 0
if x != 0.0:
tmp_3 = (y * 2.0) / ((x - y) / x)
else:
tmp_3 = t_0
tmp_1 = tmp_3
elif y != 0.0:
tmp_1 = (x + x) / ((x / y) - 1.0)
else:
tmp_1 = ((y + y) * x) / (x - y)
return tmp_1
function code(x, y)
return Float64(Float64(Float64(x * 2.0) * y) / Float64(x - y))
end
↓
function code(x, y)
t_0 = Float64(Float64(y * Float64(2.0 * x)) / Float64(x - y))
tmp_1 = 0.0
if (y <= -20000.0)
tmp_2 = 0.0
if (y != 0.0)
tmp_2 = Float64(x / Float64(Float64(x - y) / Float64(y * 2.0)));
else
tmp_2 = t_0;
end
tmp_1 = tmp_2;
elseif (y <= 1e-103)
tmp_3 = 0.0
if (x != 0.0)
tmp_3 = Float64(Float64(y * 2.0) / Float64(Float64(x - y) / x));
else
tmp_3 = t_0;
end
tmp_1 = tmp_3;
elseif (y != 0.0)
tmp_1 = Float64(Float64(x + x) / Float64(Float64(x / y) - 1.0));
else
tmp_1 = Float64(Float64(Float64(y + y) * x) / Float64(x - y));
end
return tmp_1
end
function tmp = code(x, y)
tmp = ((x * 2.0) * y) / (x - y);
end
↓
function tmp_5 = code(x, y)
t_0 = (y * (2.0 * x)) / (x - y);
tmp_2 = 0.0;
if (y <= -20000.0)
tmp_3 = 0.0;
if (y ~= 0.0)
tmp_3 = x / ((x - y) / (y * 2.0));
else
tmp_3 = t_0;
end
tmp_2 = tmp_3;
elseif (y <= 1e-103)
tmp_4 = 0.0;
if (x ~= 0.0)
tmp_4 = (y * 2.0) / ((x - y) / x);
else
tmp_4 = t_0;
end
tmp_2 = tmp_4;
elseif (y ~= 0.0)
tmp_2 = (x + x) / ((x / y) - 1.0);
else
tmp_2 = ((y + y) * x) / (x - y);
end
tmp_5 = tmp_2;
end
code[x_, y_] := N[(N[(N[(x * 2.0), $MachinePrecision] * y), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_] := Block[{t$95$0 = N[(N[(y * N[(2.0 * x), $MachinePrecision]), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -20000.0], If[Unequal[y, 0.0], N[(x / N[(N[(x - y), $MachinePrecision] / N[(y * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0], If[LessEqual[y, 1e-103], If[Unequal[x, 0.0], N[(N[(y * 2.0), $MachinePrecision] / N[(N[(x - y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], t$95$0], If[Unequal[y, 0.0], N[(N[(x + x), $MachinePrecision] / N[(N[(x / y), $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(N[(y + y), $MachinePrecision] * x), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]]]]]
\frac{\left(x \cdot 2\right) \cdot y}{x - y}
↓
\begin{array}{l}
t_0 := \frac{y \cdot \left(2 \cdot x\right)}{x - y}\\
\mathbf{if}\;y \leq -20000:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;y \ne 0:\\
\;\;\;\;\frac{x}{\frac{x - y}{y \cdot 2}}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}\\
\mathbf{elif}\;y \leq 10^{-103}:\\
\;\;\;\;\begin{array}{l}
\mathbf{if}\;x \ne 0:\\
\;\;\;\;\frac{y \cdot 2}{\frac{x - y}{x}}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}\\
\mathbf{elif}\;y \ne 0:\\
\;\;\;\;\frac{x + x}{\frac{x}{y} - 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\left(y + y\right) \cdot x}{x - y}\\
\end{array}