\[ \begin{array}{c}[x, y] = \mathsf{sort}([x, y])\\ \end{array} \]
Math FPCore C Julia Wolfram TeX \[\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2}
\]
↓
\[\begin{array}{l}
t_1 := \frac{t}{\frac{a}{z}}\\
t_2 := x \cdot y + t \cdot \left(z \cdot -9\right)\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;\mathsf{fma}\left(-4.5, t_1, \frac{\frac{y \cdot 0.5}{a}}{\frac{1}{x}}\right)\\
\mathbf{elif}\;t_2 \leq 10^{+205}:\\
\;\;\;\;\frac{x \cdot y + z \cdot \left(t \cdot -9\right)}{a \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-4.5, t_1, 0.5 \cdot \frac{y}{\frac{a}{x}}\right)\\
\end{array}
\]
(FPCore (x y z t a)
:precision binary64
(/ (- (* x y) (* (* z 9.0) t)) (* a 2.0))) ↓
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ t (/ a z))) (t_2 (+ (* x y) (* t (* z -9.0)))))
(if (<= t_2 (- INFINITY))
(fma -4.5 t_1 (/ (/ (* y 0.5) a) (/ 1.0 x)))
(if (<= t_2 1e+205)
(/ (+ (* x y) (* z (* t -9.0))) (* a 2.0))
(fma -4.5 t_1 (* 0.5 (/ y (/ a x)))))))) double code(double x, double y, double z, double t, double a) {
return ((x * y) - ((z * 9.0) * t)) / (a * 2.0);
}
↓
double code(double x, double y, double z, double t, double a) {
double t_1 = t / (a / z);
double t_2 = (x * y) + (t * (z * -9.0));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = fma(-4.5, t_1, (((y * 0.5) / a) / (1.0 / x)));
} else if (t_2 <= 1e+205) {
tmp = ((x * y) + (z * (t * -9.0))) / (a * 2.0);
} else {
tmp = fma(-4.5, t_1, (0.5 * (y / (a / x))));
}
return tmp;
}
function code(x, y, z, t, a)
return Float64(Float64(Float64(x * y) - Float64(Float64(z * 9.0) * t)) / Float64(a * 2.0))
end
↓
function code(x, y, z, t, a)
t_1 = Float64(t / Float64(a / z))
t_2 = Float64(Float64(x * y) + Float64(t * Float64(z * -9.0)))
tmp = 0.0
if (t_2 <= Float64(-Inf))
tmp = fma(-4.5, t_1, Float64(Float64(Float64(y * 0.5) / a) / Float64(1.0 / x)));
elseif (t_2 <= 1e+205)
tmp = Float64(Float64(Float64(x * y) + Float64(z * Float64(t * -9.0))) / Float64(a * 2.0));
else
tmp = fma(-4.5, t_1, Float64(0.5 * Float64(y / Float64(a / x))));
end
return tmp
end
code[x_, y_, z_, t_, a_] := N[(N[(N[(x * y), $MachinePrecision] - N[(N[(z * 9.0), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t / N[(a / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * y), $MachinePrecision] + N[(t * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(-4.5 * t$95$1 + N[(N[(N[(y * 0.5), $MachinePrecision] / a), $MachinePrecision] / N[(1.0 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+205], N[(N[(N[(x * y), $MachinePrecision] + N[(z * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a * 2.0), $MachinePrecision]), $MachinePrecision], N[(-4.5 * t$95$1 + N[(0.5 * N[(y / N[(a / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\frac{x \cdot y - \left(z \cdot 9\right) \cdot t}{a \cdot 2}
↓
\begin{array}{l}
t_1 := \frac{t}{\frac{a}{z}}\\
t_2 := x \cdot y + t \cdot \left(z \cdot -9\right)\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;\mathsf{fma}\left(-4.5, t_1, \frac{\frac{y \cdot 0.5}{a}}{\frac{1}{x}}\right)\\
\mathbf{elif}\;t_2 \leq 10^{+205}:\\
\;\;\;\;\frac{x \cdot y + z \cdot \left(t \cdot -9\right)}{a \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-4.5, t_1, 0.5 \cdot \frac{y}{\frac{a}{x}}\right)\\
\end{array}
Alternatives Alternative 1 Error 0.9 Cost 8520
\[\begin{array}{l}
t_1 := x \cdot y + t \cdot \left(z \cdot -9\right)\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{+243}:\\
\;\;\;\;\left(x \cdot 0.5\right) \cdot \frac{y}{a} + -4.5 \cdot \left(t \cdot \frac{z}{a}\right)\\
\mathbf{elif}\;t_1 \leq 10^{+205}:\\
\;\;\;\;\frac{x \cdot y + z \cdot \left(t \cdot -9\right)}{a \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-4.5, \frac{t}{\frac{a}{z}}, 0.5 \cdot \frac{y}{\frac{a}{x}}\right)\\
\end{array}
\]
Alternative 2 Error 0.9 Cost 2249
\[\begin{array}{l}
t_1 := x \cdot y + t \cdot \left(z \cdot -9\right)\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{+243} \lor \neg \left(t_1 \leq 10^{+238}\right):\\
\;\;\;\;\left(x \cdot 0.5\right) \cdot \frac{y}{a} + -4.5 \cdot \left(t \cdot \frac{z}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x \cdot y + z \cdot \left(t \cdot -9\right)}{a \cdot 2}\\
\end{array}
\]
Alternative 3 Error 3.9 Cost 2120
\[\begin{array}{l}
t_1 := x \cdot y + t \cdot \left(z \cdot -9\right)\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;x \cdot \frac{y}{\frac{a}{0.5}}\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+307}:\\
\;\;\;\;\frac{x \cdot y + z \cdot \left(t \cdot -9\right)}{a \cdot 2}\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(-4.5 \cdot \frac{z}{a}\right)\\
\end{array}
\]
Alternative 4 Error 25.3 Cost 1504
\[\begin{array}{l}
t_1 := -4.5 \cdot \frac{z \cdot t}{a}\\
t_2 := 0.5 \cdot \frac{y}{\frac{a}{x}}\\
t_3 := 0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\
\mathbf{if}\;x \leq -2.4 \cdot 10^{+103}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -1.02 \cdot 10^{+67}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -2.6 \cdot 10^{-19}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \leq -1.85 \cdot 10^{-87}:\\
\;\;\;\;-4.5 \cdot \left(z \cdot \frac{t}{a}\right)\\
\mathbf{elif}\;x \leq -7.2 \cdot 10^{-119}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \leq 5 \cdot 10^{-221}:\\
\;\;\;\;-4.5 \cdot \frac{t}{\frac{a}{z}}\\
\mathbf{elif}\;x \leq 2.8 \cdot 10^{-187}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 4.7 \cdot 10^{-101}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\]
Alternative 5 Error 24.5 Cost 1372
\[\begin{array}{l}
t_1 := -4.5 \cdot \frac{z \cdot t}{a}\\
t_2 := 0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\
\mathbf{if}\;x \leq -2 \cdot 10^{+102}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -9.5 \cdot 10^{+66}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -1.7 \cdot 10^{-16}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -2.8 \cdot 10^{-87}:\\
\;\;\;\;-4.5 \cdot \left(z \cdot \frac{t}{a}\right)\\
\mathbf{elif}\;x \leq -3.75 \cdot 10^{-119}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 2 \cdot 10^{-256}:\\
\;\;\;\;-4.5 \cdot \frac{t}{\frac{a}{z}}\\
\mathbf{elif}\;x \leq 2.5 \cdot 10^{-99}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 6 Error 25.7 Cost 1240
\[\begin{array}{l}
t_1 := -4.5 \cdot \left(z \cdot \frac{t}{a}\right)\\
\mathbf{if}\;t \leq -2.4 \cdot 10^{-139}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 6 \cdot 10^{-181}:\\
\;\;\;\;x \cdot \frac{y}{\frac{a}{0.5}}\\
\mathbf{elif}\;t \leq 9 \cdot 10^{-159}:\\
\;\;\;\;-4.5 \cdot \frac{z \cdot t}{a}\\
\mathbf{elif}\;t \leq 7.2 \cdot 10^{+21}:\\
\;\;\;\;0.5 \cdot \frac{y}{\frac{a}{x}}\\
\mathbf{elif}\;t \leq 2.25 \cdot 10^{+53}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 4.7 \cdot 10^{+85}:\\
\;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(-4.5 \cdot \frac{z}{a}\right)\\
\end{array}
\]
Alternative 7 Error 25.7 Cost 1240
\[\begin{array}{l}
t_1 := z \cdot \frac{t \cdot -4.5}{a}\\
\mathbf{if}\;t \leq -2.75 \cdot 10^{-139}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{-180}:\\
\;\;\;\;x \cdot \frac{y}{\frac{a}{0.5}}\\
\mathbf{elif}\;t \leq 5 \cdot 10^{-159}:\\
\;\;\;\;-4.5 \cdot \frac{z \cdot t}{a}\\
\mathbf{elif}\;t \leq 3 \cdot 10^{+22}:\\
\;\;\;\;0.5 \cdot \frac{y}{\frac{a}{x}}\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{+51}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 7.8 \cdot 10^{+85}:\\
\;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(-4.5 \cdot \frac{z}{a}\right)\\
\end{array}
\]
Alternative 8 Error 25.3 Cost 1240
\[\begin{array}{l}
t_1 := z \cdot \frac{t \cdot -4.5}{a}\\
\mathbf{if}\;t \leq -2.75 \cdot 10^{-139}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 9.2 \cdot 10^{-181}:\\
\;\;\;\;\left(x \cdot y\right) \cdot \frac{0.5}{a}\\
\mathbf{elif}\;t \leq 1.7 \cdot 10^{-158}:\\
\;\;\;\;-4.5 \cdot \frac{z \cdot t}{a}\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{+23}:\\
\;\;\;\;0.5 \cdot \frac{y}{\frac{a}{x}}\\
\mathbf{elif}\;t \leq 4.8 \cdot 10^{+52}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 5.2 \cdot 10^{+85}:\\
\;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(-4.5 \cdot \frac{z}{a}\right)\\
\end{array}
\]
Alternative 9 Error 25.3 Cost 1240
\[\begin{array}{l}
t_1 := \frac{z}{\frac{\frac{a}{-4.5}}{t}}\\
\mathbf{if}\;t \leq -2.75 \cdot 10^{-139}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{-180}:\\
\;\;\;\;\left(x \cdot y\right) \cdot \frac{0.5}{a}\\
\mathbf{elif}\;t \leq 4.8 \cdot 10^{-159}:\\
\;\;\;\;-4.5 \cdot \frac{z \cdot t}{a}\\
\mathbf{elif}\;t \leq 1.95 \cdot 10^{+20}:\\
\;\;\;\;0.5 \cdot \frac{y}{\frac{a}{x}}\\
\mathbf{elif}\;t \leq 1.55 \cdot 10^{+54}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 4.4 \cdot 10^{+85}:\\
\;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(-4.5 \cdot \frac{z}{a}\right)\\
\end{array}
\]
Alternative 10 Error 25.3 Cost 1240
\[\begin{array}{l}
t_1 := \frac{z}{\frac{\frac{a}{-4.5}}{t}}\\
\mathbf{if}\;t \leq -2.75 \cdot 10^{-139}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{-180}:\\
\;\;\;\;\frac{x \cdot y}{\frac{a}{0.5}}\\
\mathbf{elif}\;t \leq 4.8 \cdot 10^{-159}:\\
\;\;\;\;-4.5 \cdot \frac{z \cdot t}{a}\\
\mathbf{elif}\;t \leq 1.45 \cdot 10^{+22}:\\
\;\;\;\;0.5 \cdot \frac{y}{\frac{a}{x}}\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{+54}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 7 \cdot 10^{+85}:\\
\;\;\;\;0.5 \cdot \left(x \cdot \frac{y}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(-4.5 \cdot \frac{z}{a}\right)\\
\end{array}
\]
Alternative 11 Error 32.9 Cost 712
\[\begin{array}{l}
\mathbf{if}\;y \leq -4.2 \cdot 10^{-262}:\\
\;\;\;\;-4.5 \cdot \left(t \cdot \frac{z}{a}\right)\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{-107}:\\
\;\;\;\;-4.5 \cdot \left(z \cdot \frac{t}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;-4.5 \cdot \frac{t}{\frac{a}{z}}\\
\end{array}
\]
Alternative 12 Error 32.6 Cost 580
\[\begin{array}{l}
\mathbf{if}\;y \leq -7.5 \cdot 10^{-263}:\\
\;\;\;\;-4.5 \cdot \left(t \cdot \frac{z}{a}\right)\\
\mathbf{else}:\\
\;\;\;\;-4.5 \cdot \left(z \cdot \frac{t}{a}\right)\\
\end{array}
\]
Alternative 13 Error 32.7 Cost 448
\[-4.5 \cdot \left(z \cdot \frac{t}{a}\right)
\]