\[ \begin{array}{c}[z, t] = \mathsf{sort}([z, t])\\ \end{array} \]
\[\left(2 \cdot \sqrt{x}\right) \cdot \cos \left(y - \frac{z \cdot t}{3}\right) - \frac{a}{b \cdot 3}
\]
↓
\[\begin{array}{l}
t_1 := \frac{a}{b \cdot 3}\\
t_2 := t \cdot \left(z \cdot 0.3333333333333333\right)\\
t_3 := \sin t_2\\
t_4 := 2 \cdot \sqrt{x}\\
t_5 := \cos y \cdot \cos t_2\\
\mathbf{if}\;z \cdot t \leq -4 \cdot 10^{+34}:\\
\;\;\;\;t_4 - t_1\\
\mathbf{elif}\;z \cdot t \leq 5 \cdot 10^{+293}:\\
\;\;\;\;\frac{t_4}{\frac{t_5 - \sin y \cdot t_3}{t_5 \cdot t_5 - {\sin y}^{2} \cdot \left(t_3 \cdot t_3\right)}} - t_1\\
\mathbf{else}:\\
\;\;\;\;t_4 \cdot \mathsf{log1p}\left(\sqrt{{\left(\mathsf{expm1}\left(\cos y\right)\right)}^{2}}\right) - t_1\\
\end{array}
\]
(FPCore (x y z t a b)
:precision binary64
(- (* (* 2.0 (sqrt x)) (cos (- y (/ (* z t) 3.0)))) (/ a (* b 3.0))))
↓
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ a (* b 3.0)))
(t_2 (* t (* z 0.3333333333333333)))
(t_3 (sin t_2))
(t_4 (* 2.0 (sqrt x)))
(t_5 (* (cos y) (cos t_2))))
(if (<= (* z t) -4e+34)
(- t_4 t_1)
(if (<= (* z t) 5e+293)
(-
(/
t_4
(/
(- t_5 (* (sin y) t_3))
(- (* t_5 t_5) (* (pow (sin y) 2.0) (* t_3 t_3)))))
t_1)
(- (* t_4 (log1p (sqrt (pow (expm1 (cos y)) 2.0)))) t_1)))))double code(double x, double y, double z, double t, double a, double b) {
return ((2.0 * sqrt(x)) * cos((y - ((z * t) / 3.0)))) - (a / (b * 3.0));
}
↓
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a / (b * 3.0);
double t_2 = t * (z * 0.3333333333333333);
double t_3 = sin(t_2);
double t_4 = 2.0 * sqrt(x);
double t_5 = cos(y) * cos(t_2);
double tmp;
if ((z * t) <= -4e+34) {
tmp = t_4 - t_1;
} else if ((z * t) <= 5e+293) {
tmp = (t_4 / ((t_5 - (sin(y) * t_3)) / ((t_5 * t_5) - (pow(sin(y), 2.0) * (t_3 * t_3))))) - t_1;
} else {
tmp = (t_4 * log1p(sqrt(pow(expm1(cos(y)), 2.0)))) - t_1;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
return ((2.0 * Math.sqrt(x)) * Math.cos((y - ((z * t) / 3.0)))) - (a / (b * 3.0));
}
↓
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a / (b * 3.0);
double t_2 = t * (z * 0.3333333333333333);
double t_3 = Math.sin(t_2);
double t_4 = 2.0 * Math.sqrt(x);
double t_5 = Math.cos(y) * Math.cos(t_2);
double tmp;
if ((z * t) <= -4e+34) {
tmp = t_4 - t_1;
} else if ((z * t) <= 5e+293) {
tmp = (t_4 / ((t_5 - (Math.sin(y) * t_3)) / ((t_5 * t_5) - (Math.pow(Math.sin(y), 2.0) * (t_3 * t_3))))) - t_1;
} else {
tmp = (t_4 * Math.log1p(Math.sqrt(Math.pow(Math.expm1(Math.cos(y)), 2.0)))) - t_1;
}
return tmp;
}
def code(x, y, z, t, a, b):
return ((2.0 * math.sqrt(x)) * math.cos((y - ((z * t) / 3.0)))) - (a / (b * 3.0))
↓
def code(x, y, z, t, a, b):
t_1 = a / (b * 3.0)
t_2 = t * (z * 0.3333333333333333)
t_3 = math.sin(t_2)
t_4 = 2.0 * math.sqrt(x)
t_5 = math.cos(y) * math.cos(t_2)
tmp = 0
if (z * t) <= -4e+34:
tmp = t_4 - t_1
elif (z * t) <= 5e+293:
tmp = (t_4 / ((t_5 - (math.sin(y) * t_3)) / ((t_5 * t_5) - (math.pow(math.sin(y), 2.0) * (t_3 * t_3))))) - t_1
else:
tmp = (t_4 * math.log1p(math.sqrt(math.pow(math.expm1(math.cos(y)), 2.0)))) - t_1
return tmp
function code(x, y, z, t, a, b)
return Float64(Float64(Float64(2.0 * sqrt(x)) * cos(Float64(y - Float64(Float64(z * t) / 3.0)))) - Float64(a / Float64(b * 3.0)))
end
↓
function code(x, y, z, t, a, b)
t_1 = Float64(a / Float64(b * 3.0))
t_2 = Float64(t * Float64(z * 0.3333333333333333))
t_3 = sin(t_2)
t_4 = Float64(2.0 * sqrt(x))
t_5 = Float64(cos(y) * cos(t_2))
tmp = 0.0
if (Float64(z * t) <= -4e+34)
tmp = Float64(t_4 - t_1);
elseif (Float64(z * t) <= 5e+293)
tmp = Float64(Float64(t_4 / Float64(Float64(t_5 - Float64(sin(y) * t_3)) / Float64(Float64(t_5 * t_5) - Float64((sin(y) ^ 2.0) * Float64(t_3 * t_3))))) - t_1);
else
tmp = Float64(Float64(t_4 * log1p(sqrt((expm1(cos(y)) ^ 2.0)))) - t_1);
end
return tmp
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(2.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision] * N[Cos[N[(y - N[(N[(z * t), $MachinePrecision] / 3.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - N[(a / N[(b * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a / N[(b * 3.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(z * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[Sin[t$95$2], $MachinePrecision]}, Block[{t$95$4 = N[(2.0 * N[Sqrt[x], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(N[Cos[y], $MachinePrecision] * N[Cos[t$95$2], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(z * t), $MachinePrecision], -4e+34], N[(t$95$4 - t$95$1), $MachinePrecision], If[LessEqual[N[(z * t), $MachinePrecision], 5e+293], N[(N[(t$95$4 / N[(N[(t$95$5 - N[(N[Sin[y], $MachinePrecision] * t$95$3), $MachinePrecision]), $MachinePrecision] / N[(N[(t$95$5 * t$95$5), $MachinePrecision] - N[(N[Power[N[Sin[y], $MachinePrecision], 2.0], $MachinePrecision] * N[(t$95$3 * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(t$95$4 * N[Log[1 + N[Sqrt[N[Power[N[(Exp[N[Cos[y], $MachinePrecision]] - 1), $MachinePrecision], 2.0], $MachinePrecision]], $MachinePrecision]], $MachinePrecision]), $MachinePrecision] - t$95$1), $MachinePrecision]]]]]]]]
\left(2 \cdot \sqrt{x}\right) \cdot \cos \left(y - \frac{z \cdot t}{3}\right) - \frac{a}{b \cdot 3}
↓
\begin{array}{l}
t_1 := \frac{a}{b \cdot 3}\\
t_2 := t \cdot \left(z \cdot 0.3333333333333333\right)\\
t_3 := \sin t_2\\
t_4 := 2 \cdot \sqrt{x}\\
t_5 := \cos y \cdot \cos t_2\\
\mathbf{if}\;z \cdot t \leq -4 \cdot 10^{+34}:\\
\;\;\;\;t_4 - t_1\\
\mathbf{elif}\;z \cdot t \leq 5 \cdot 10^{+293}:\\
\;\;\;\;\frac{t_4}{\frac{t_5 - \sin y \cdot t_3}{t_5 \cdot t_5 - {\sin y}^{2} \cdot \left(t_3 \cdot t_3\right)}} - t_1\\
\mathbf{else}:\\
\;\;\;\;t_4 \cdot \mathsf{log1p}\left(\sqrt{{\left(\mathsf{expm1}\left(\cos y\right)\right)}^{2}}\right) - t_1\\
\end{array}
Alternatives
| Alternative 1 |
|---|
| Error | 16.4 |
|---|
| Cost | 40648 |
|---|
\[\begin{array}{l}
t_1 := 2 \cdot \sqrt{x}\\
t_2 := \frac{a}{b \cdot 3}\\
t_3 := t \cdot \left(z \cdot 0.3333333333333333\right)\\
\mathbf{if}\;z \cdot t \leq -4 \cdot 10^{+34}:\\
\;\;\;\;t_1 - t_2\\
\mathbf{elif}\;z \cdot t \leq 5 \cdot 10^{+293}:\\
\;\;\;\;2 \cdot \left(\sqrt{x} \cdot \left(\sin y \cdot \sin t_3\right) + \sqrt{x} \cdot \left(\cos y \cdot \cos t_3\right)\right) - t_2\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \mathsf{log1p}\left(\sqrt{{\left(\mathsf{expm1}\left(\cos y\right)\right)}^{2}}\right) - t_2\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 16.3 |
|---|
| Cost | 40392 |
|---|
\[\begin{array}{l}
t_1 := \frac{a}{b \cdot 3}\\
t_2 := 2 \cdot \sqrt{x}\\
\mathbf{if}\;z \cdot t \leq -2 \cdot 10^{+41}:\\
\;\;\;\;t_2 - t_1\\
\mathbf{elif}\;z \cdot t \leq 10^{+22}:\\
\;\;\;\;2 \cdot \left(\sqrt{x} \cdot \mathsf{fma}\left(\cos \left(t \cdot \frac{z}{-3}\right), \cos y, \sin y \cdot \sin \left(\left(z \cdot t\right) \cdot 0.3333333333333333\right)\right)\right) - t_1\\
\mathbf{else}:\\
\;\;\;\;t_2 \cdot \mathsf{expm1}\left(\mathsf{fma}\left(-0.25, y \cdot y, \log 2\right)\right) - t_1\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 16.3 |
|---|
| Cost | 34120 |
|---|
\[\begin{array}{l}
t_1 := 2 \cdot \sqrt{x}\\
t_2 := \frac{a}{b \cdot 3}\\
t_3 := t \cdot \frac{z}{-3}\\
\mathbf{if}\;z \cdot t \leq -2 \cdot 10^{+41}:\\
\;\;\;\;t_1 - t_2\\
\mathbf{elif}\;z \cdot t \leq 10^{+22}:\\
\;\;\;\;2 \cdot \left(\sqrt{x} \cdot \left(\cos y \cdot \cos t_3 - \sin y \cdot \sin t_3\right)\right) - t_2\\
\mathbf{else}:\\
\;\;\;\;t_1 \cdot \mathsf{expm1}\left(\mathsf{fma}\left(-0.25, y \cdot y, \log 2\right)\right) - t_2\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 16.3 |
|---|
| Cost | 34120 |
|---|
\[\begin{array}{l}
t_1 := \frac{a}{b \cdot 3}\\
t_2 := 2 \cdot \sqrt{x}\\
\mathbf{if}\;z \cdot t \leq -2 \cdot 10^{+41}:\\
\;\;\;\;t_2 - t_1\\
\mathbf{elif}\;z \cdot t \leq 10^{+22}:\\
\;\;\;\;t_2 \cdot \left(\cos y \cdot \cos \left(t \cdot \frac{z}{3}\right) - \sin y \cdot \sin \left(t \cdot \left(z \cdot -0.3333333333333333\right)\right)\right) - t_1\\
\mathbf{else}:\\
\;\;\;\;t_2 \cdot \mathsf{expm1}\left(\mathsf{fma}\left(-0.25, y \cdot y, \log 2\right)\right) - t_1\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 17.1 |
|---|
| Cost | 19776 |
|---|
\[\mathsf{fma}\left(2, \sqrt{x} \cdot \cos y, \frac{\frac{a}{-3}}{b}\right)
\]
| Alternative 6 |
|---|
| Error | 20.2 |
|---|
| Cost | 14025 |
|---|
\[\begin{array}{l}
t_1 := \frac{a}{b \cdot 3}\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{-63} \lor \neg \left(t_1 \leq 10^{-73}\right):\\
\;\;\;\;\mathsf{fma}\left(2, \sqrt{x}, \frac{\frac{a}{-3}}{b}\right)\\
\mathbf{else}:\\
\;\;\;\;\sqrt{x} \cdot \left(2 \cdot \cos y\right)\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 20.2 |
|---|
| Cost | 13897 |
|---|
\[\begin{array}{l}
t_1 := \frac{a}{b \cdot 3}\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{-63} \lor \neg \left(t_1 \leq 10^{-73}\right):\\
\;\;\;\;2 \cdot \sqrt{x} - t_1\\
\mathbf{else}:\\
\;\;\;\;\sqrt{x} \cdot \left(2 \cdot \cos y\right)\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 17.1 |
|---|
| Cost | 13504 |
|---|
\[\frac{-0.3333333333333333}{\frac{b}{a}} + 2 \cdot \left(\sqrt{x} \cdot \cos y\right)
\]
| Alternative 9 |
|---|
| Error | 17.1 |
|---|
| Cost | 13504 |
|---|
\[\left(2 \cdot \sqrt{x}\right) \cdot \cos y + a \cdot \frac{-0.3333333333333333}{b}
\]
| Alternative 10 |
|---|
| Error | 17.1 |
|---|
| Cost | 13504 |
|---|
\[\left(2 \cdot \sqrt{x}\right) \cdot \cos y - \frac{a}{b \cdot 3}
\]
| Alternative 11 |
|---|
| Error | 25.2 |
|---|
| Cost | 6976 |
|---|
\[2 \cdot \sqrt{x} + -0.3333333333333333 \cdot \frac{a}{b}
\]
| Alternative 12 |
|---|
| Error | 25.1 |
|---|
| Cost | 6976 |
|---|
\[2 \cdot \sqrt{x} - \frac{a}{b \cdot 3}
\]
| Alternative 13 |
|---|
| Error | 35.7 |
|---|
| Cost | 320 |
|---|
\[-0.3333333333333333 \cdot \frac{a}{b}
\]
| Alternative 14 |
|---|
| Error | 35.7 |
|---|
| Cost | 320 |
|---|
\[\frac{a \cdot -0.3333333333333333}{b}
\]
| Alternative 15 |
|---|
| Error | 35.6 |
|---|
| Cost | 320 |
|---|
\[\frac{\frac{a}{-3}}{b}
\]