Math FPCore C Fortran Java Python Julia MATLAB Wolfram TeX \[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z
\]
↓
\[\left(x - \left(\left(y + 0.5\right) \cdot \log y - y\right)\right) - z
\]
(FPCore (x y z) :precision binary64 (- (+ (- x (* (+ y 0.5) (log y))) y) z)) ↓
(FPCore (x y z) :precision binary64 (- (- x (- (* (+ y 0.5) (log y)) y)) z)) double code(double x, double y, double z) {
return ((x - ((y + 0.5) * log(y))) + y) - z;
}
↓
double code(double x, double y, double z) {
return (x - (((y + 0.5) * log(y)) - y)) - z;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((x - ((y + 0.5d0) * log(y))) + 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
code = (x - (((y + 0.5d0) * log(y)) - y)) - z
end function
public static double code(double x, double y, double z) {
return ((x - ((y + 0.5) * Math.log(y))) + y) - z;
}
↓
public static double code(double x, double y, double z) {
return (x - (((y + 0.5) * Math.log(y)) - y)) - z;
}
def code(x, y, z):
return ((x - ((y + 0.5) * math.log(y))) + y) - z
↓
def code(x, y, z):
return (x - (((y + 0.5) * math.log(y)) - y)) - z
function code(x, y, z)
return Float64(Float64(Float64(x - Float64(Float64(y + 0.5) * log(y))) + y) - z)
end
↓
function code(x, y, z)
return Float64(Float64(x - Float64(Float64(Float64(y + 0.5) * log(y)) - y)) - z)
end
function tmp = code(x, y, z)
tmp = ((x - ((y + 0.5) * log(y))) + y) - z;
end
↓
function tmp = code(x, y, z)
tmp = (x - (((y + 0.5) * log(y)) - y)) - z;
end
code[x_, y_, z_] := N[(N[(N[(x - N[(N[(y + 0.5), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision] - z), $MachinePrecision]
↓
code[x_, y_, z_] := N[(N[(x - N[(N[(N[(y + 0.5), $MachinePrecision] * N[Log[y], $MachinePrecision]), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]
\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z
↓
\left(x - \left(\left(y + 0.5\right) \cdot \log y - y\right)\right) - z
Alternatives Alternative 1 Error 7.4 Cost 7768
\[\begin{array}{l}
t_0 := \left(x - 0.5 \cdot \log y\right) - z\\
t_1 := \log y \cdot \left(0.5 + y\right)\\
t_2 := x - \left(t_1 - y\right)\\
t_3 := \left(y - z\right) - t_1\\
\mathbf{if}\;x \leq -3.05 \cdot 10^{+113}:\\
\;\;\;\;x - z\\
\mathbf{elif}\;x \leq -1.65 \cdot 10^{+16}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -19:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 3.2 \cdot 10^{+66}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \leq 5.5 \cdot 10^{+125}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 1.6 \cdot 10^{+161}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 2 Error 19.9 Cost 7512
\[\begin{array}{l}
t_0 := \left(1 - \log y\right) \cdot y\\
\mathbf{if}\;y \leq 1.7 \cdot 10^{-243}:\\
\;\;\;\;x - z\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{-192}:\\
\;\;\;\;x - 0.5 \cdot \log y\\
\mathbf{elif}\;y \leq 2.9 \cdot 10^{-168}:\\
\;\;\;\;\log y \cdot -0.5 - z\\
\mathbf{elif}\;y \leq 5.5 \cdot 10^{+104}:\\
\;\;\;\;x - z\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{+140}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{+184}:\\
\;\;\;\;x - z\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 3 Error 19.3 Cost 7380
\[\begin{array}{l}
t_0 := \left(1 - \log y\right) \cdot y\\
\mathbf{if}\;y \leq 2.9 \cdot 10^{-184}:\\
\;\;\;\;x - z\\
\mathbf{elif}\;y \leq 5.8 \cdot 10^{-174}:\\
\;\;\;\;-0.5 \cdot \log y\\
\mathbf{elif}\;y \leq 4.9 \cdot 10^{+104}:\\
\;\;\;\;x - z\\
\mathbf{elif}\;y \leq 1.7 \cdot 10^{+137}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{+184}:\\
\;\;\;\;x - z\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 4 Error 19.9 Cost 7380
\[\begin{array}{l}
t_0 := \left(1 - \log y\right) \cdot y\\
\mathbf{if}\;y \leq 1.12 \cdot 10^{-243}:\\
\;\;\;\;x - z\\
\mathbf{elif}\;y \leq 2.25 \cdot 10^{-168}:\\
\;\;\;\;x - 0.5 \cdot \log y\\
\mathbf{elif}\;y \leq 5.8 \cdot 10^{+104}:\\
\;\;\;\;x - z\\
\mathbf{elif}\;y \leq 4.4 \cdot 10^{+140}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{+184}:\\
\;\;\;\;x - z\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 5 Error 19.6 Cost 7376
\[\begin{array}{l}
t_0 := y - \left(0.5 + y\right) \cdot \log y\\
\mathbf{if}\;x \leq -8.5 \cdot 10^{-32}:\\
\;\;\;\;x - z\\
\mathbf{elif}\;x \leq -4.9 \cdot 10^{-110}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 2.8 \cdot 10^{-96}:\\
\;\;\;\;\log y \cdot -0.5 - z\\
\mathbf{elif}\;x \leq 510:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;x - z\\
\end{array}
\]
Alternative 6 Error 10.8 Cost 7244
\[\begin{array}{l}
t_0 := \left(x - 0.5 \cdot \log y\right) - z\\
\mathbf{if}\;y \leq 2.15 \cdot 10^{+113}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 1.55 \cdot 10^{+140}:\\
\;\;\;\;y - y \cdot \log y\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{+184}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\left(1 - \log y\right) \cdot y\\
\end{array}
\]
Alternative 7 Error 7.0 Cost 7240
\[\begin{array}{l}
\mathbf{if}\;z \leq -3.15 \cdot 10^{+66}:\\
\;\;\;\;x - z\\
\mathbf{elif}\;z \leq 5.7 \cdot 10^{+112}:\\
\;\;\;\;x - \left(\log y \cdot \left(0.5 + y\right) - y\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x - 0.5 \cdot \log y\right) - z\\
\end{array}
\]
Alternative 8 Error 0.1 Cost 7104
\[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z
\]
Alternative 9 Error 27.6 Cost 6856
\[\begin{array}{l}
\mathbf{if}\;z \leq -7.5 \cdot 10^{-151}:\\
\;\;\;\;x - z\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{-257}:\\
\;\;\;\;-0.5 \cdot \log y\\
\mathbf{else}:\\
\;\;\;\;x - z\\
\end{array}
\]
Alternative 10 Error 33.4 Cost 392
\[\begin{array}{l}
\mathbf{if}\;z \leq -4.9 \cdot 10^{+69}:\\
\;\;\;\;-z\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{+133}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;-z\\
\end{array}
\]
Alternative 11 Error 26.6 Cost 192
\[x - z
\]
Alternative 12 Error 44.7 Cost 64
\[x
\]