Math FPCore C Java Python Julia MATLAB Wolfram TeX \[x + \frac{\left(y - x\right) \cdot z}{t}
\]
↓
\[\begin{array}{l}
t_1 := x + z \cdot \frac{y - x}{t}\\
t_2 := x + \frac{\left(y - x\right) \cdot z}{t}\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_2 \leq -2 \cdot 10^{-80}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_2 \leq 2 \cdot 10^{-180}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_2 \leq 10^{+305}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
(FPCore (x y z t) :precision binary64 (+ x (/ (* (- y x) z) t))) ↓
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (+ x (* z (/ (- y x) t)))) (t_2 (+ x (/ (* (- y x) z) t))))
(if (<= t_2 (- INFINITY))
t_1
(if (<= t_2 -2e-80)
t_2
(if (<= t_2 2e-180) t_1 (if (<= t_2 1e+305) t_2 t_1)))))) double code(double x, double y, double z, double t) {
return x + (((y - x) * z) / t);
}
↓
double code(double x, double y, double z, double t) {
double t_1 = x + (z * ((y - x) / t));
double t_2 = x + (((y - x) * z) / t);
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_1;
} else if (t_2 <= -2e-80) {
tmp = t_2;
} else if (t_2 <= 2e-180) {
tmp = t_1;
} else if (t_2 <= 1e+305) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x, double y, double z, double t) {
return x + (((y - x) * z) / t);
}
↓
public static double code(double x, double y, double z, double t) {
double t_1 = x + (z * ((y - x) / t));
double t_2 = x + (((y - x) * z) / t);
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_1;
} else if (t_2 <= -2e-80) {
tmp = t_2;
} else if (t_2 <= 2e-180) {
tmp = t_1;
} else if (t_2 <= 1e+305) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t):
return x + (((y - x) * z) / t)
↓
def code(x, y, z, t):
t_1 = x + (z * ((y - x) / t))
t_2 = x + (((y - x) * z) / t)
tmp = 0
if t_2 <= -math.inf:
tmp = t_1
elif t_2 <= -2e-80:
tmp = t_2
elif t_2 <= 2e-180:
tmp = t_1
elif t_2 <= 1e+305:
tmp = t_2
else:
tmp = t_1
return tmp
function code(x, y, z, t)
return Float64(x + Float64(Float64(Float64(y - x) * z) / t))
end
↓
function code(x, y, z, t)
t_1 = Float64(x + Float64(z * Float64(Float64(y - x) / t)))
t_2 = Float64(x + Float64(Float64(Float64(y - x) * z) / t))
tmp = 0.0
if (t_2 <= Float64(-Inf))
tmp = t_1;
elseif (t_2 <= -2e-80)
tmp = t_2;
elseif (t_2 <= 2e-180)
tmp = t_1;
elseif (t_2 <= 1e+305)
tmp = t_2;
else
tmp = t_1;
end
return tmp
end
function tmp = code(x, y, z, t)
tmp = x + (((y - x) * z) / t);
end
↓
function tmp_2 = code(x, y, z, t)
t_1 = x + (z * ((y - x) / t));
t_2 = x + (((y - x) * z) / t);
tmp = 0.0;
if (t_2 <= -Inf)
tmp = t_1;
elseif (t_2 <= -2e-80)
tmp = t_2;
elseif (t_2 <= 2e-180)
tmp = t_1;
elseif (t_2 <= 1e+305)
tmp = t_2;
else
tmp = t_1;
end
tmp_2 = tmp;
end
code[x_, y_, z_, t_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x + N[(z * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -2e-80], t$95$2, If[LessEqual[t$95$2, 2e-180], t$95$1, If[LessEqual[t$95$2, 1e+305], t$95$2, t$95$1]]]]]]
x + \frac{\left(y - x\right) \cdot z}{t}
↓
\begin{array}{l}
t_1 := x + z \cdot \frac{y - x}{t}\\
t_2 := x + \frac{\left(y - x\right) \cdot z}{t}\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_2 \leq -2 \cdot 10^{-80}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_2 \leq 2 \cdot 10^{-180}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t_2 \leq 10^{+305}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
Alternatives Alternative 1 Error 2.3 Cost 6980
\[\begin{array}{l}
\mathbf{if}\;x \leq -1 \cdot 10^{+41}:\\
\;\;\;\;\mathsf{fma}\left(y - x, \frac{z}{t}, x\right)\\
\mathbf{elif}\;x \leq -3.3 \cdot 10^{-278}:\\
\;\;\;\;x + z \cdot \frac{y - x}{t}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - x}{\frac{t}{z}}\\
\end{array}
\]
Alternative 2 Error 11.9 Cost 1636
\[\begin{array}{l}
t_1 := x + \frac{y}{\frac{t}{z}}\\
t_2 := z \cdot \frac{y - x}{t}\\
t_3 := x - x \cdot \frac{z}{t}\\
\mathbf{if}\;x \leq -4.3 \cdot 10^{+88}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \leq -1.1 \cdot 10^{-36}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -5.6 \cdot 10^{-90}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -1.4 \cdot 10^{-131}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -4.4 \cdot 10^{-140}:\\
\;\;\;\;x - z \cdot \frac{x}{t}\\
\mathbf{elif}\;x \leq -6.8 \cdot 10^{-159}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 1.7 \cdot 10^{-12}:\\
\;\;\;\;x + \frac{z}{\frac{t}{y}}\\
\mathbf{elif}\;x \leq 3.2 \cdot 10^{+20}:\\
\;\;\;\;\left(y - x\right) \cdot \frac{z}{t}\\
\mathbf{elif}\;x \leq 10^{+50}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\]
Alternative 3 Error 12.3 Cost 1636
\[\begin{array}{l}
t_1 := x + \frac{y}{\frac{t}{z}}\\
t_2 := \frac{\left(y - x\right) \cdot z}{t}\\
t_3 := x - x \cdot \frac{z}{t}\\
t_4 := x + \frac{z}{\frac{t}{y}}\\
\mathbf{if}\;x \leq -4.5 \cdot 10^{+88}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \leq -1.1 \cdot 10^{-36}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -8.8 \cdot 10^{-110}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -1.4 \cdot 10^{-131}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;x \leq -3.4 \cdot 10^{-140}:\\
\;\;\;\;x - z \cdot \frac{x}{t}\\
\mathbf{elif}\;x \leq -6.8 \cdot 10^{-159}:\\
\;\;\;\;z \cdot \frac{y - x}{t}\\
\mathbf{elif}\;x \leq 6.5 \cdot 10^{-10}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;x \leq 3.3 \cdot 10^{+25}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 8.5 \cdot 10^{+50}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\]
Alternative 4 Error 27.6 Cost 1244
\[\begin{array}{l}
t_1 := z \cdot \frac{x}{-t}\\
t_2 := z \cdot \frac{y}{t}\\
\mathbf{if}\;x \leq -1.1 \cdot 10^{-36}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -6.5 \cdot 10^{-87}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -1.4 \cdot 10^{-131}:\\
\;\;\;\;y \cdot \frac{z}{t}\\
\mathbf{elif}\;x \leq -6.8 \cdot 10^{-159}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -1.3 \cdot 10^{-227}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -6 \cdot 10^{-257}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 1.45 \cdot 10^{-128}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\]
Alternative 5 Error 27.7 Cost 1244
\[\begin{array}{l}
t_1 := z \cdot \frac{y}{t}\\
\mathbf{if}\;x \leq -1.8 \cdot 10^{-36}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -3.4 \cdot 10^{-89}:\\
\;\;\;\;z \cdot \frac{x}{-t}\\
\mathbf{elif}\;x \leq -1.45 \cdot 10^{-131}:\\
\;\;\;\;y \cdot \frac{z}{t}\\
\mathbf{elif}\;x \leq -5.2 \cdot 10^{-159}:\\
\;\;\;\;\frac{x \cdot \left(-z\right)}{t}\\
\mathbf{elif}\;x \leq -4 \cdot 10^{-227}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -3.5 \cdot 10^{-257}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 6.5 \cdot 10^{-125}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\]
Alternative 6 Error 12.4 Cost 1240
\[\begin{array}{l}
t_1 := x + \frac{y}{\frac{t}{z}}\\
t_2 := x - x \cdot \frac{z}{t}\\
\mathbf{if}\;x \leq -4.3 \cdot 10^{+88}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -1.1 \cdot 10^{-36}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -6.8 \cdot 10^{-159}:\\
\;\;\;\;z \cdot \frac{y - x}{t}\\
\mathbf{elif}\;x \leq 3.9 \cdot 10^{-10}:\\
\;\;\;\;x + \frac{z}{\frac{t}{y}}\\
\mathbf{elif}\;x \leq 3.2 \cdot 10^{+20}:\\
\;\;\;\;\left(y - x\right) \cdot \frac{z}{t}\\
\mathbf{elif}\;x \leq 1.05 \cdot 10^{+50}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 7 Error 22.3 Cost 976
\[\begin{array}{l}
t_1 := z \cdot \frac{y - x}{t}\\
\mathbf{if}\;z \leq -3.1 \cdot 10^{-38}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -5.6 \cdot 10^{-116}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -3.15 \cdot 10^{-140}:\\
\;\;\;\;\left(y - x\right) \cdot \frac{z}{t}\\
\mathbf{elif}\;z \leq 270000:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 8 Error 4.5 Cost 840
\[\begin{array}{l}
t_1 := x - x \cdot \frac{z}{t}\\
\mathbf{if}\;x \leq -1.75 \cdot 10^{+89}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 3 \cdot 10^{+107}:\\
\;\;\;\;x + z \cdot \frac{y - x}{t}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 9 Error 2.2 Cost 840
\[\begin{array}{l}
t_1 := x + \frac{y - x}{\frac{t}{z}}\\
\mathbf{if}\;x \leq -1.55 \cdot 10^{+16}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -1.4 \cdot 10^{-276}:\\
\;\;\;\;x + z \cdot \frac{y - x}{t}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 10 Error 21.9 Cost 712
\[\begin{array}{l}
t_1 := z \cdot \frac{y - x}{t}\\
\mathbf{if}\;z \leq -1.42 \cdot 10^{-36}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 19500:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 11 Error 10.8 Cost 712
\[\begin{array}{l}
t_1 := x + \frac{y}{\frac{t}{z}}\\
\mathbf{if}\;t \leq -5 \cdot 10^{-112}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{-147}:\\
\;\;\;\;\left(y - x\right) \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 12 Error 11.0 Cost 712
\[\begin{array}{l}
t_1 := x + \frac{z}{\frac{t}{y}}\\
\mathbf{if}\;t \leq -3.2 \cdot 10^{-112}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 3.8 \cdot 10^{-126}:\\
\;\;\;\;\left(y - x\right) \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 13 Error 28.6 Cost 584
\[\begin{array}{l}
t_1 := y \cdot \frac{z}{t}\\
\mathbf{if}\;z \leq -4.8 \cdot 10^{-35}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{+27}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 14 Error 28.4 Cost 584
\[\begin{array}{l}
t_1 := z \cdot \frac{y}{t}\\
\mathbf{if}\;z \leq -5.4 \cdot 10^{-35}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 9 \cdot 10^{+27}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 15 Error 28.4 Cost 584
\[\begin{array}{l}
\mathbf{if}\;z \leq -2.4 \cdot 10^{-35}:\\
\;\;\;\;z \cdot \frac{y}{t}\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{+28}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\frac{t}{z}}\\
\end{array}
\]
Alternative 16 Error 31.0 Cost 64
\[x
\]