Math FPCore C Fortran Java Python Julia MATLAB Wolfram TeX \[x \cdot \log \left(\frac{x}{y}\right) - z
\]
↓
\[\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{-310}:\\
\;\;\;\;\log \left(\frac{\sqrt{-y}}{\sqrt{-x}}\right) \cdot \left(x \cdot -2\right) - z\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot -2\right) \cdot \log \left(\frac{\sqrt{y}}{\sqrt{x}}\right) - z\\
\end{array}
\]
(FPCore (x y z) :precision binary64 (- (* x (log (/ x y))) z)) ↓
(FPCore (x y z)
:precision binary64
(if (<= y -1e-310)
(- (* (log (/ (sqrt (- y)) (sqrt (- x)))) (* x -2.0)) z)
(- (* (* x -2.0) (log (/ (sqrt y) (sqrt x)))) z))) double code(double x, double y, double z) {
return (x * log((x / y))) - z;
}
↓
double code(double x, double y, double z) {
double tmp;
if (y <= -1e-310) {
tmp = (log((sqrt(-y) / sqrt(-x))) * (x * -2.0)) - z;
} else {
tmp = ((x * -2.0) * log((sqrt(y) / sqrt(x)))) - z;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (x * log((x / y))) - z
end function
↓
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (y <= (-1d-310)) then
tmp = (log((sqrt(-y) / sqrt(-x))) * (x * (-2.0d0))) - z
else
tmp = ((x * (-2.0d0)) * log((sqrt(y) / sqrt(x)))) - z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
return (x * Math.log((x / y))) - z;
}
↓
public static double code(double x, double y, double z) {
double tmp;
if (y <= -1e-310) {
tmp = (Math.log((Math.sqrt(-y) / Math.sqrt(-x))) * (x * -2.0)) - z;
} else {
tmp = ((x * -2.0) * Math.log((Math.sqrt(y) / Math.sqrt(x)))) - z;
}
return tmp;
}
def code(x, y, z):
return (x * math.log((x / y))) - z
↓
def code(x, y, z):
tmp = 0
if y <= -1e-310:
tmp = (math.log((math.sqrt(-y) / math.sqrt(-x))) * (x * -2.0)) - z
else:
tmp = ((x * -2.0) * math.log((math.sqrt(y) / math.sqrt(x)))) - z
return tmp
function code(x, y, z)
return Float64(Float64(x * log(Float64(x / y))) - z)
end
↓
function code(x, y, z)
tmp = 0.0
if (y <= -1e-310)
tmp = Float64(Float64(log(Float64(sqrt(Float64(-y)) / sqrt(Float64(-x)))) * Float64(x * -2.0)) - z);
else
tmp = Float64(Float64(Float64(x * -2.0) * log(Float64(sqrt(y) / sqrt(x)))) - z);
end
return tmp
end
function tmp = code(x, y, z)
tmp = (x * log((x / y))) - z;
end
↓
function tmp_2 = code(x, y, z)
tmp = 0.0;
if (y <= -1e-310)
tmp = (log((sqrt(-y) / sqrt(-x))) * (x * -2.0)) - z;
else
tmp = ((x * -2.0) * log((sqrt(y) / sqrt(x)))) - z;
end
tmp_2 = tmp;
end
code[x_, y_, z_] := N[(N[(x * N[Log[N[(x / y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]
↓
code[x_, y_, z_] := If[LessEqual[y, -1e-310], N[(N[(N[Log[N[(N[Sqrt[(-y)], $MachinePrecision] / N[Sqrt[(-x)], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[(x * -2.0), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision], N[(N[(N[(x * -2.0), $MachinePrecision] * N[Log[N[(N[Sqrt[y], $MachinePrecision] / N[Sqrt[x], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]]
x \cdot \log \left(\frac{x}{y}\right) - z
↓
\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{-310}:\\
\;\;\;\;\log \left(\frac{\sqrt{-y}}{\sqrt{-x}}\right) \cdot \left(x \cdot -2\right) - z\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot -2\right) \cdot \log \left(\frac{\sqrt{y}}{\sqrt{x}}\right) - z\\
\end{array}
Alternatives Alternative 1 Error 7.9 Cost 20424
\[\begin{array}{l}
t_0 := x \cdot \log \left(\frac{x}{y}\right)\\
\mathbf{if}\;t_0 \leq -\infty:\\
\;\;\;\;-z\\
\mathbf{elif}\;t_0 \leq 10^{+305}:\\
\;\;\;\;t_0 - z\\
\mathbf{else}:\\
\;\;\;\;-z\\
\end{array}
\]
Alternative 2 Error 0.2 Cost 19908
\[\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{-310}:\\
\;\;\;\;x \cdot \left(\log \left(-x\right) - \log \left(-y\right)\right) - z\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot -2\right) \cdot \log \left(\frac{\sqrt{y}}{\sqrt{x}}\right) - z\\
\end{array}
\]
Alternative 3 Error 4.6 Cost 13644
\[\begin{array}{l}
\mathbf{if}\;x \leq -9.4 \cdot 10^{+232}:\\
\;\;\;\;x \cdot \left(\log \left(-x\right) - \log \left(-y\right)\right)\\
\mathbf{elif}\;x \leq -5.6 \cdot 10^{-186}:\\
\;\;\;\;\left(-x\right) \cdot \log \left(\frac{y}{x}\right) - z\\
\mathbf{elif}\;x \leq -1 \cdot 10^{-307}:\\
\;\;\;\;-z\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x - \log y\right) - z\\
\end{array}
\]
Alternative 4 Error 0.3 Cost 13508
\[\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{-310}:\\
\;\;\;\;x \cdot \left(\log \left(-x\right) - \log \left(-y\right)\right) - z\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(\log x - \log y\right) - z\\
\end{array}
\]
Alternative 5 Error 21.6 Cost 7249
\[\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{-12}:\\
\;\;\;\;-z\\
\mathbf{elif}\;z \leq 3.45 \cdot 10^{-99} \lor \neg \left(z \leq 1.1 \cdot 10^{-55}\right) \land z \leq 1.5 \cdot 10^{-7}:\\
\;\;\;\;x \cdot \log \left(\frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;-z\\
\end{array}
\]
Alternative 6 Error 21.6 Cost 7248
\[\begin{array}{l}
\mathbf{if}\;z \leq -1.7 \cdot 10^{-9}:\\
\;\;\;\;-z\\
\mathbf{elif}\;z \leq 4.8 \cdot 10^{-100}:\\
\;\;\;\;\left(-x\right) \cdot \log \left(\frac{y}{x}\right)\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{-56}:\\
\;\;\;\;-z\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{-7}:\\
\;\;\;\;x \cdot \log \left(\frac{x}{y}\right)\\
\mathbf{else}:\\
\;\;\;\;-z\\
\end{array}
\]
Alternative 7 Error 32.2 Cost 128
\[-z
\]