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 -1 \cdot 10^{+46}:\\
\;\;\;\;\left|\frac{x}{\frac{y}{1 - z}}\right|\\
\mathbf{elif}\;x \leq 2.260811174163227 \cdot 10^{-155}:\\
\;\;\;\;\left|t_0 - \frac{x \cdot z}{y}\right|\\
\mathbf{else}:\\
\;\;\;\;\left|t_0 - z \cdot \frac{x}{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 -1e+46)
(fabs (/ x (/ y (- 1.0 z))))
(if (<= x 2.260811174163227e-155)
(fabs (- t_0 (/ (* x z) y)))
(fabs (- t_0 (* z (/ x 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 <= -1e+46) {
tmp = fabs((x / (y / (1.0 - z))));
} else if (x <= 2.260811174163227e-155) {
tmp = fabs((t_0 - ((x * z) / y)));
} else {
tmp = fabs((t_0 - (z * (x / 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 <= (-1d+46)) then
tmp = abs((x / (y / (1.0d0 - z))))
else if (x <= 2.260811174163227d-155) then
tmp = abs((t_0 - ((x * z) / y)))
else
tmp = abs((t_0 - (z * (x / 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 <= -1e+46) {
tmp = Math.abs((x / (y / (1.0 - z))));
} else if (x <= 2.260811174163227e-155) {
tmp = Math.abs((t_0 - ((x * z) / y)));
} else {
tmp = Math.abs((t_0 - (z * (x / 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 <= -1e+46:
tmp = math.fabs((x / (y / (1.0 - z))))
elif x <= 2.260811174163227e-155:
tmp = math.fabs((t_0 - ((x * z) / y)))
else:
tmp = math.fabs((t_0 - (z * (x / 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 <= -1e+46)
tmp = abs(Float64(x / Float64(y / Float64(1.0 - z))));
elseif (x <= 2.260811174163227e-155)
tmp = abs(Float64(t_0 - Float64(Float64(x * z) / y)));
else
tmp = abs(Float64(t_0 - Float64(z * Float64(x / 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 <= -1e+46)
tmp = abs((x / (y / (1.0 - z))));
elseif (x <= 2.260811174163227e-155)
tmp = abs((t_0 - ((x * z) / y)));
else
tmp = abs((t_0 - (z * (x / 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, -1e+46], N[Abs[N[(x / N[(y / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], If[LessEqual[x, 2.260811174163227e-155], N[Abs[N[(t$95$0 - N[(N[(x * z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], N[Abs[N[(t$95$0 - N[(z * N[(x / 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 -1 \cdot 10^{+46}:\\
\;\;\;\;\left|\frac{x}{\frac{y}{1 - z}}\right|\\
\mathbf{elif}\;x \leq 2.260811174163227 \cdot 10^{-155}:\\
\;\;\;\;\left|t_0 - \frac{x \cdot z}{y}\right|\\
\mathbf{else}:\\
\;\;\;\;\left|t_0 - z \cdot \frac{x}{y}\right|\\
\end{array}
Alternatives Alternative 1 Error 0.3 Cost 7368
\[\begin{array}{l}
t_0 := \left|\frac{x}{\frac{y}{1 - z}}\right|\\
\mathbf{if}\;x \leq -1 \cdot 10^{+46}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 10^{+100}:\\
\;\;\;\;\left|\frac{x + 4}{y} - \frac{x \cdot z}{y}\right|\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 2 Error 4.8 Cost 7244
\[\begin{array}{l}
t_0 := \left|\frac{4 - x \cdot z}{y}\right|\\
\mathbf{if}\;z \leq -30786486.299687263:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 9.43084176186724 \cdot 10^{-9}:\\
\;\;\;\;\left|\frac{x + 4}{y}\right|\\
\mathbf{elif}\;z \leq 10^{+175}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;\left|x \cdot \frac{z}{y}\right|\\
\end{array}
\]
Alternative 3 Error 1.1 Cost 7240
\[\begin{array}{l}
t_0 := \left|\frac{x}{\frac{y}{1 - z}}\right|\\
\mathbf{if}\;x \leq -591353427706.8567:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 2.9908120938300156 \cdot 10^{-10}:\\
\;\;\;\;\left|\frac{4}{y} - \frac{x \cdot z}{y}\right|\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 4 Error 0.3 Cost 7240
\[\begin{array}{l}
t_0 := \left|\frac{x}{\frac{y}{1 - z}}\right|\\
\mathbf{if}\;x \leq -1 \cdot 10^{+46}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 10^{+100}:\\
\;\;\;\;\left|\frac{\left(x + 4\right) - x \cdot z}{y}\right|\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 5 Error 1.0 Cost 7112
\[\begin{array}{l}
t_0 := \left|\frac{x}{\frac{y}{1 - z}}\right|\\
\mathbf{if}\;x \leq -591353427706.8567:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 2.9908120938300156 \cdot 10^{-10}:\\
\;\;\;\;\left|\frac{4 - x \cdot z}{y}\right|\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 6 Error 19.3 Cost 6988
\[\begin{array}{l}
t_0 := \left|\frac{x}{y}\right|\\
\mathbf{if}\;x \leq -1.369526861616593:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq -1.375575257912459 \cdot 10^{-63}:\\
\;\;\;\;\left|x \cdot \frac{z}{y}\right|\\
\mathbf{elif}\;x \leq 1.4475894409323352 \cdot 10^{-8}:\\
\;\;\;\;\frac{4}{\left|y\right|}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 7 Error 19.2 Cost 6988
\[\begin{array}{l}
t_0 := \left|\frac{x}{y}\right|\\
\mathbf{if}\;x \leq -1.369526861616593:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq -1.375575257912459 \cdot 10^{-63}:\\
\;\;\;\;\left|\frac{x}{\frac{y}{z}}\right|\\
\mathbf{elif}\;x \leq 1.4475894409323352 \cdot 10^{-8}:\\
\;\;\;\;\frac{4}{\left|y\right|}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 8 Error 11.6 Cost 6984
\[\begin{array}{l}
\mathbf{if}\;z \leq -9.1 \cdot 10^{+77}:\\
\;\;\;\;\left|x \cdot \frac{z}{y}\right|\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{+61}:\\
\;\;\;\;\left|\frac{x + 4}{y}\right|\\
\mathbf{else}:\\
\;\;\;\;\left|\frac{x}{\frac{y}{z}}\right|\\
\end{array}
\]
Alternative 9 Error 18.9 Cost 6856
\[\begin{array}{l}
t_0 := \left|\frac{x}{y}\right|\\
\mathbf{if}\;x \leq -591353427706.8567:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 1.4475894409323352 \cdot 10^{-8}:\\
\;\;\;\;\frac{4}{\left|y\right|}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
Alternative 10 Error 46.7 Cost 6592
\[\left|\frac{x}{y}\right|
\]