Math FPCore C Fortran Java Python Julia MATLAB Wolfram TeX \[\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right|
\]
↓
\[\begin{array}{l}
t_0 := \frac{x + 4}{y}\\
\mathbf{if}\;x \leq -4.6541639256961256 \cdot 10^{-110}:\\
\;\;\;\;\left|t_0 - \frac{x}{\frac{y}{z}}\right|\\
\mathbf{elif}\;x \leq 10^{+34}:\\
\;\;\;\;\left|\frac{\left(x + 4\right) - x \cdot z}{y}\right|\\
\mathbf{else}:\\
\;\;\;\;\left|t_0 - x \cdot \frac{z}{y}\right|\\
\end{array}
\]
(FPCore (x y z) :precision binary64 (fabs (- (/ (+ x 4.0) y) (* (/ x y) z)))) ↓
(FPCore (x y z)
:precision binary64
(let* ((t_0 (/ (+ x 4.0) y)))
(if (<= x -4.6541639256961256e-110)
(fabs (- t_0 (/ x (/ y z))))
(if (<= x 1e+34)
(fabs (/ (- (+ x 4.0) (* x z)) y))
(fabs (- t_0 (* x (/ z y)))))))) double code(double x, double y, double z) {
return fabs((((x + 4.0) / y) - ((x / y) * z)));
}
↓
double code(double x, double y, double z) {
double t_0 = (x + 4.0) / y;
double tmp;
if (x <= -4.6541639256961256e-110) {
tmp = fabs((t_0 - (x / (y / z))));
} else if (x <= 1e+34) {
tmp = fabs((((x + 4.0) - (x * z)) / y));
} else {
tmp = fabs((t_0 - (x * (z / y))));
}
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 = abs((((x + 4.0d0) / y) - ((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) :: t_0
real(8) :: tmp
t_0 = (x + 4.0d0) / y
if (x <= (-4.6541639256961256d-110)) then
tmp = abs((t_0 - (x / (y / z))))
else if (x <= 1d+34) then
tmp = abs((((x + 4.0d0) - (x * z)) / y))
else
tmp = abs((t_0 - (x * (z / y))))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
return Math.abs((((x + 4.0) / y) - ((x / y) * z)));
}
↓
public static double code(double x, double y, double z) {
double t_0 = (x + 4.0) / y;
double tmp;
if (x <= -4.6541639256961256e-110) {
tmp = Math.abs((t_0 - (x / (y / z))));
} else if (x <= 1e+34) {
tmp = Math.abs((((x + 4.0) - (x * z)) / y));
} else {
tmp = Math.abs((t_0 - (x * (z / y))));
}
return tmp;
}
def code(x, y, z):
return math.fabs((((x + 4.0) / y) - ((x / y) * z)))
↓
def code(x, y, z):
t_0 = (x + 4.0) / y
tmp = 0
if x <= -4.6541639256961256e-110:
tmp = math.fabs((t_0 - (x / (y / z))))
elif x <= 1e+34:
tmp = math.fabs((((x + 4.0) - (x * z)) / y))
else:
tmp = math.fabs((t_0 - (x * (z / y))))
return tmp
function code(x, y, z)
return abs(Float64(Float64(Float64(x + 4.0) / y) - Float64(Float64(x / y) * z)))
end
↓
function code(x, y, z)
t_0 = Float64(Float64(x + 4.0) / y)
tmp = 0.0
if (x <= -4.6541639256961256e-110)
tmp = abs(Float64(t_0 - Float64(x / Float64(y / z))));
elseif (x <= 1e+34)
tmp = abs(Float64(Float64(Float64(x + 4.0) - Float64(x * z)) / y));
else
tmp = abs(Float64(t_0 - Float64(x * Float64(z / y))));
end
return tmp
end
function tmp = code(x, y, z)
tmp = abs((((x + 4.0) / y) - ((x / y) * z)));
end
↓
function tmp_2 = code(x, y, z)
t_0 = (x + 4.0) / y;
tmp = 0.0;
if (x <= -4.6541639256961256e-110)
tmp = abs((t_0 - (x / (y / z))));
elseif (x <= 1e+34)
tmp = abs((((x + 4.0) - (x * z)) / y));
else
tmp = abs((t_0 - (x * (z / y))));
end
tmp_2 = tmp;
end
code[x_, y_, z_] := N[Abs[N[(N[(N[(x + 4.0), $MachinePrecision] / y), $MachinePrecision] - N[(N[(x / y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
↓
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x + 4.0), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[x, -4.6541639256961256e-110], N[Abs[N[(t$95$0 - N[(x / N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[x, 1e+34], N[Abs[N[(N[(N[(x + 4.0), $MachinePrecision] - N[(x * z), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]], $MachinePrecision], N[Abs[N[(t$95$0 - N[(x * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]]]]
\left|\frac{x + 4}{y} - \frac{x}{y} \cdot z\right|
↓
\begin{array}{l}
t_0 := \frac{x + 4}{y}\\
\mathbf{if}\;x \leq -4.6541639256961256 \cdot 10^{-110}:\\
\;\;\;\;\left|t_0 - \frac{x}{\frac{y}{z}}\right|\\
\mathbf{elif}\;x \leq 10^{+34}:\\
\;\;\;\;\left|\frac{\left(x + 4\right) - x \cdot z}{y}\right|\\
\mathbf{else}:\\
\;\;\;\;\left|t_0 - x \cdot \frac{z}{y}\right|\\
\end{array}
Alternatives Alternative 1 Error 0.1 Cost 7368
\[\begin{array}{l}
t_0 := \frac{x + 4}{y}\\
\mathbf{if}\;x \leq -4.038698827692165 \cdot 10^{-37}:\\
\;\;\;\;\left|t_0 - \frac{z}{\frac{y}{x}}\right|\\
\mathbf{elif}\;x \leq 10^{+34}:\\
\;\;\;\;\left|\frac{\left(x + 4\right) - x \cdot z}{y}\right|\\
\mathbf{else}:\\
\;\;\;\;\left|t_0 - x \cdot \frac{z}{y}\right|\\
\end{array}
\]
Alternative 2 Error 1.6 Cost 7236
\[\begin{array}{l}
\mathbf{if}\;y \leq 10^{-40}:\\
\;\;\;\;\left|\frac{\left(x + 4\right) - x \cdot z}{y}\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{x + 4}{y} - x \cdot \frac{z}{y}\right|\\
\end{array}
\]
Alternative 3 Error 19.5 Cost 7120
\[\begin{array}{l}
t_0 := \left|\frac{x}{y}\right|\\
\mathbf{if}\;x \leq -2.5 \cdot 10^{+66}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq -1.4 \cdot 10^{+28}:\\
\;\;\;\;\left|z \cdot \frac{x}{y}\right|\\
\mathbf{elif}\;x \leq -358279.2040577703:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 3.0183503999642145:\\
\;\;\;\;\frac{4}{\left|y\right|}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 4 Error 19.5 Cost 7120
\[\begin{array}{l}
t_0 := \left|\frac{x}{y}\right|\\
\mathbf{if}\;x \leq -2.5 \cdot 10^{+66}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq -1.4 \cdot 10^{+28}:\\
\;\;\;\;\left|\frac{x}{\frac{y}{z}}\right|\\
\mathbf{elif}\;x \leq -358279.2040577703:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 3.0183503999642145:\\
\;\;\;\;\frac{4}{\left|y\right|}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 5 Error 9.1 Cost 7112
\[\begin{array}{l}
t_0 := \left|\frac{1 - z}{\frac{y}{x}}\right|\\
\mathbf{if}\;x \leq -4.038698827692165 \cdot 10^{-37}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 3.0183503999642145:\\
\;\;\;\;\left|\frac{-4}{y} - \frac{x}{y}\right|\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 6 Error 1.7 Cost 7108
\[\begin{array}{l}
\mathbf{if}\;x \leq 10^{+40}:\\
\;\;\;\;\left|\frac{\left(x + 4\right) - x \cdot z}{y}\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{1 - z}{\frac{y}{x}}\right|\\
\end{array}
\]
Alternative 7 Error 1.7 Cost 7108
\[\begin{array}{l}
\mathbf{if}\;x \leq 10^{+34}:\\
\;\;\;\;\left|\frac{\left(x + 4\right) - x \cdot z}{y}\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{x}{y} - \frac{z}{\frac{y}{x}}\right|\\
\end{array}
\]
Alternative 8 Error 11.6 Cost 6984
\[\begin{array}{l}
\mathbf{if}\;z \leq -2.8330409732078132 \cdot 10^{+62}:\\
\;\;\;\;\left|\frac{x}{\frac{y}{z}}\right|\\
\mathbf{elif}\;z \leq 1.524302918986109 \cdot 10^{+54}:\\
\;\;\;\;\left|\frac{x + 4}{y}\right|\\
\mathbf{else}:\\
\;\;\;\;\left|z \cdot \frac{x}{y}\right|\\
\end{array}
\]
Alternative 9 Error 19.0 Cost 6856
\[\begin{array}{l}
t_0 := \left|\frac{x}{y}\right|\\
\mathbf{if}\;x \leq -358279.2040577703:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 3.0183503999642145:\\
\;\;\;\;\frac{4}{\left|y\right|}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 10 Error 47.0 Cost 6592
\[\left|\frac{x}{y}\right|
\]