1 |
dashley |
30 |
%$Header: /home/dashley/cvsrep/uculib01/uculib01/doc/manual/c_afn0/c_afn0.tex,v 1.37 2010/05/12 18:35:49 dashley Exp $ |
2 |
|
|
|
3 |
|
|
\chapter{Arithmetic Functions} |
4 |
|
|
|
5 |
|
|
\label{cafn0} |
6 |
|
|
|
7 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
8 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
9 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
10 |
|
|
\section{Introduction and Overview} |
11 |
|
|
%Section tag: iov0 |
12 |
|
|
\label{cafn0:siov0} |
13 |
|
|
|
14 |
|
|
This chapter documents functions that perform arithmetic. |
15 |
|
|
|
16 |
|
|
\begin{itemize} |
17 |
|
|
\item \S{}\ref{cafn0:sscx0} (p. \pageref{cafn0:sscx0}) documents |
18 |
|
|
functions that compare UCU\_UINT16 data. |
19 |
|
|
\item \S{}\ref{cafn0:slsf0} (p. \pageref{cafn0:slsf0}) documents |
20 |
|
|
functions that calculate or approximate functions of the form |
21 |
|
|
$y=mx$, where $y$ is a UCU\_UINT16. |
22 |
|
|
\item \S{}\ref{cafn0:ssre0} (p. \pageref{cafn0:ssre0}) documents |
23 |
|
|
functions that calculate or approximate square roots. |
24 |
|
|
\end{itemize} |
25 |
|
|
|
26 |
|
|
|
27 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
28 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
29 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
30 |
|
|
\section{UCU\_UINT16 Comparison Functions} |
31 |
|
|
%Section tag: scx0 |
32 |
|
|
\label{cafn0:sscx0} |
33 |
|
|
|
34 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
35 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
36 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
37 |
|
|
\subsection[\emph{UcuAtU16CmpDiffAbsGtRxx(\protect\mbox{\protect$\cdot$})}] |
38 |
|
|
{\emph{UcuAtU16CmpDiffAbsGtRxx(\protect\mbox{\protect\boldmath $\cdot$})}} |
39 |
|
|
%Subsection tag: csx0 |
40 |
|
|
\label{cafn0:sscx0:scsx0} |
41 |
|
|
|
42 |
|
|
\index{UcuAtU16CmpDiffAbsGtRxx()@\emph{UcuAtU16CmpDiffAbsGtRxx($\cdot$)}}% |
43 |
|
|
|
44 |
|
|
\noindent\textbf{PROTOTYPE} |
45 |
|
|
\begin {list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
46 |
|
|
\item |
47 |
|
|
\begin{verbatim} |
48 |
|
|
UCU_BOOLEAN UcuAtU16CmpDiffAbsGtRxx( |
49 |
|
|
UCU_UINT16 x1, |
50 |
|
|
UCU_UINT16 x2, |
51 |
|
|
UCU_UINT16 d |
52 |
|
|
) |
53 |
|
|
\end{verbatim} |
54 |
|
|
\end{list} |
55 |
|
|
\vspace{2.8ex} |
56 |
|
|
|
57 |
|
|
\noindent\textbf{SYNOPSIS} |
58 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
59 |
|
|
\item Returns UCU\_TRUE if $|x_1-x_2|>d$, or UCU\_FALSE otherwise. |
60 |
|
|
\end{list} |
61 |
|
|
\vspace{2.8ex} |
62 |
|
|
|
63 |
|
|
\noindent\textbf{INPUTS} |
64 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.5in}\setlength{\itemindent}{-0.25in}\setlength{\topsep}{0.0in}\setlength{\partopsep}{0.0in}} |
65 |
|
|
\item \emph{\textbf{x1}}, \emph{\textbf{x2}}\\ |
66 |
|
|
The UCU\_UINT16 arguments to compare. |
67 |
|
|
\item \emph{\textbf{d}}\\ |
68 |
|
|
The comparison threshold. |
69 |
|
|
\end{list} |
70 |
|
|
\vspace{2.8ex} |
71 |
|
|
|
72 |
|
|
\noindent\textbf{OUTPUT} |
73 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
74 |
|
|
\item UCU\_TRUE if $|x_1-x_2|>d$, or UCU\_FALSE otherwise. |
75 |
|
|
\end{list} |
76 |
|
|
\vspace{2.8ex} |
77 |
|
|
|
78 |
|
|
\noindent\textbf{DETAILED DESCRIPTION} |
79 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
80 |
|
|
\item \emph{UcuAtU16CmpDiffAbsGtRxx($\cdot$)} determines whether |
81 |
|
|
$x_1$ and $x_2$ are more than $d$ apart. |
82 |
|
|
\item The function is |
83 |
|
|
typically used to detect change in a value (either negative or positive) |
84 |
|
|
of a magnitude greater than $d$, |
85 |
|
|
or to determine if two values are within $d$ of each other. |
86 |
|
|
\item \emph{UcuAtU16CmpDiffAbsGtRxx($\cdot$)} is symmetric with |
87 |
|
|
respect to its arguments: $f(x_1, x_2) \equiv f(x_2, x_1)$. |
88 |
|
|
\end{list} |
89 |
|
|
\vspace{2.8ex} |
90 |
|
|
|
91 |
|
|
\noindent\textbf{INTERRUPT COMPATIBILITY} |
92 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
93 |
|
|
\item This function may be used from both non-ISR and ISR software. |
94 |
|
|
\item This function is thread-safe. |
95 |
|
|
\end{list} |
96 |
|
|
\vspace{2.8ex} |
97 |
|
|
|
98 |
|
|
\noindent\textbf{EXECUTION TIME} |
99 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
100 |
|
|
\item TBD. |
101 |
|
|
\end{list} |
102 |
|
|
\vspace{2.8ex} |
103 |
|
|
|
104 |
|
|
\noindent\textbf{FUNCTION NAME MNEMONIC} |
105 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
106 |
|
|
\item \emph{U16}: arguments and return type are UCU\_UINT16. |
107 |
|
|
\emph{Cmp}: compare. |
108 |
|
|
\emph{Diff}: difference. |
109 |
|
|
\emph{Abs}: absolute value. |
110 |
|
|
\emph{Gt}: greater than. |
111 |
|
|
\end{list} |
112 |
|
|
|
113 |
|
|
|
114 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
115 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
116 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
117 |
|
|
%\section{UCU\_SINT32 Complement and Negation Functions} |
118 |
|
|
%\label{cafn0:scnf0} |
119 |
|
|
% |
120 |
|
|
% |
121 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
122 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
123 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
124 |
|
|
%\subsection[\emph{UcuAtS32NegationRxx(\protect\mbox{\protect$\cdot$})}] |
125 |
|
|
% {\emph{UcuAtS32NegationRxx(\protect\mbox{\protect\boldmath $\cdot$})}} |
126 |
|
|
%\label{cafn0:scnf0:sstf0} |
127 |
|
|
% |
128 |
|
|
%\index{UcuAtS32NegationRxx()@\emph{UcuAtS32NegationRxx($\cdot$)}}% |
129 |
|
|
% |
130 |
|
|
%\noindent\textbf{PROTOTYPE} |
131 |
|
|
%\begin {list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
132 |
|
|
%\item |
133 |
|
|
%\begin{verbatim} |
134 |
|
|
%UCU_SINT32 UcuAtS32NegationRxx( UCU_SINT32 x ) |
135 |
|
|
%\end{verbatim} |
136 |
|
|
%\end{list} |
137 |
|
|
%\vspace{2.8ex} |
138 |
|
|
% |
139 |
|
|
%\noindent\textbf{SYNOPSIS} |
140 |
|
|
%\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
141 |
|
|
%\item Returns the 1's complement of $x$, plus 1. In most cases, this represents |
142 |
|
|
% $-x$, but $-2^{31}$ (the most negative representable value) maps to |
143 |
|
|
% $-2^{31}$ (this is a standard feature of the 2's complement representation of signed |
144 |
|
|
% integers). |
145 |
|
|
%\end{list} |
146 |
|
|
%\vspace{2.8ex} |
147 |
|
|
% |
148 |
|
|
%\noindent\textbf{INPUTS} |
149 |
|
|
%\begin{list}{}{\setlength{\leftmargin}{0.5in}\setlength{\itemindent}{-0.25in}\setlength{\topsep}{0.0in}\setlength{\partopsep}{0.0in}} |
150 |
|
|
%\item \emph{\textbf{x}} \\ |
151 |
|
|
% The UCU\_SINT32 integer to negate. |
152 |
|
|
%\end{list} |
153 |
|
|
%\vspace{2.8ex} |
154 |
|
|
% |
155 |
|
|
%\noindent\textbf{OUTPUT} |
156 |
|
|
%\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
157 |
|
|
%\item The 1's complement of $x$, plus 1 |
158 |
|
|
%\end{list} |
159 |
|
|
%\vspace{2.8ex} |
160 |
|
|
% |
161 |
|
|
%\noindent\textbf{INTERRUPT COMPATIBILITY} |
162 |
|
|
%\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
163 |
|
|
%\item This function may be used from both non-ISR and ISR software. |
164 |
|
|
%\item This function is thread-safe. |
165 |
|
|
%\end{list} |
166 |
|
|
%\vspace{2.8ex} |
167 |
|
|
% |
168 |
|
|
%\noindent\textbf{EXECUTION TIME} |
169 |
|
|
%\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
170 |
|
|
%\item TBD. |
171 |
|
|
%\end{list} |
172 |
|
|
%\vspace{2.8ex} |
173 |
|
|
% |
174 |
|
|
%\noindent\textbf{FUNCTION NAME MNEMONIC} |
175 |
|
|
%\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
176 |
|
|
%\item \emph{Negation}: negates the argument. |
177 |
|
|
%\end{list} |
178 |
|
|
% |
179 |
|
|
% |
180 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
181 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
182 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
183 |
|
|
\section{UCU\_UINT16 Linear Scaling Functions, Zero Y-Intercept} |
184 |
|
|
%Section tag: lsf0 |
185 |
|
|
\label{cafn0:slsf0} |
186 |
|
|
|
187 |
|
|
|
188 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
189 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
190 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
191 |
|
|
\subsection[\emph{UcuAtU16LscZyiFAxdAxrRxx(\protect\mbox{\protect$\cdot$})}] |
192 |
|
|
{\emph{UcuAtU16LscZyiFAxdAxrRxx(\protect\mbox{\protect\boldmath $\cdot$})}} |
193 |
|
|
%Subsection tag: faa0 |
194 |
|
|
\label{cafn0:slsf0:sfaa0} |
195 |
|
|
|
196 |
|
|
\index{UcuAtU16LscZyiFAxdAxrRxx()@\emph{UcuAtU16LscZyiFAxdAxrRxx($\cdot$)}}% |
197 |
|
|
|
198 |
|
|
\noindent\textbf{PROTOTYPE} |
199 |
|
|
\begin {list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
200 |
|
|
\item |
201 |
|
|
\begin{verbatim} |
202 |
|
|
UCU_UINT16 UcuAtU16LscZyiFAxdAxrRxx( |
203 |
|
|
UCU_UINT16 x, |
204 |
|
|
UCU_UINT16 x_max, |
205 |
|
|
UCU_UINT16 y_max |
206 |
|
|
) |
207 |
|
|
\end{verbatim} |
208 |
|
|
\end{list} |
209 |
|
|
\vspace{2.8ex} |
210 |
|
|
|
211 |
|
|
\noindent\textbf{SYNOPSIS} |
212 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
213 |
|
|
\item Linearly scales (or projects) from $[0, x_{max}]$ to $[0, y_{max}]$, |
214 |
|
|
implementing the floor function (discarding any remainder resulting |
215 |
|
|
from the division). The value calculated is |
216 |
|
|
$\displaystyle{\left\lfloor \frac{y_{max} x}{x_{max}} \right\rfloor}$, |
217 |
|
|
with the provision that the function output will never |
218 |
|
|
exceed $y_{max}$. |
219 |
|
|
|
220 |
|
|
\end{list} |
221 |
|
|
\vspace{2.8ex} |
222 |
|
|
|
223 |
|
|
\noindent\textbf{INPUTS} |
224 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.5in}\setlength{\itemindent}{-0.25in}\setlength{\topsep}{0.0in}\setlength{\partopsep}{0.0in}} |
225 |
|
|
\item \emph{\textbf{x}}\\ |
226 |
|
|
The input to scale. |
227 |
|
|
\item \emph{\textbf{x\_max}}\\ |
228 |
|
|
The value of $x$ that should correspond to $y_{max}$. |
229 |
|
|
\item \emph{\textbf{y\_max}}\\ |
230 |
|
|
The maximum output value of the function. |
231 |
|
|
\end{list} |
232 |
|
|
\vspace{2.8ex} |
233 |
|
|
|
234 |
|
|
\noindent\textbf{OUTPUT} |
235 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
236 |
|
|
\item $\displaystyle{\left\lfloor \frac{y_{max} x}{x_{max}} \right\rfloor}$, with |
237 |
|
|
a maximum of $y_{max}$. |
238 |
|
|
\end{list} |
239 |
|
|
\vspace{2.8ex} |
240 |
|
|
|
241 |
|
|
\noindent\textbf{EXCEPTION CASES} |
242 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
243 |
|
|
\item If $x>x_{max}$, $y_{max}$ is returned. |
244 |
|
|
\item If $x_{max}=0$ or $y_{max}=0$, 0 is returned. (In either of these |
245 |
|
|
cases, it isn't possible to determine the intent of the caller, |
246 |
|
|
so 0 is the safest return value.) |
247 |
|
|
\end{list} |
248 |
|
|
\vspace{2.8ex} |
249 |
|
|
|
250 |
|
|
\noindent\textbf{INTERRUPT COMPATIBILITY} |
251 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
252 |
|
|
\item This function may be used from both non-ISR and ISR software. |
253 |
|
|
\item This function is thread-safe. |
254 |
|
|
\end{list} |
255 |
|
|
\vspace{2.8ex} |
256 |
|
|
|
257 |
|
|
\noindent\textbf{EXECUTION TIME} |
258 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
259 |
|
|
\item TBD. |
260 |
|
|
\end{list} |
261 |
|
|
\vspace{2.8ex} |
262 |
|
|
|
263 |
|
|
\noindent\textbf{FUNCTION NAME MNEMONIC} |
264 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
265 |
|
|
\item \emph{U16}: operates on and returns UCU\_UINT16. |
266 |
|
|
\emph{Lsc}: linear scaling function. |
267 |
|
|
\emph{Zyi}: zero $y$ intercept. |
268 |
|
|
\emph{F}: result floored (rather than rounded). |
269 |
|
|
\emph{Axd}: arbitrary maxima of domain. |
270 |
|
|
\emph{Axr}: arbitrary maxima of range. |
271 |
|
|
\end{list} |
272 |
|
|
|
273 |
|
|
|
274 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
275 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
276 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
277 |
|
|
\subsection[\emph{UcuAtU16LscZyiRAxdAxrRxx(\protect\mbox{\protect$\cdot$})}] |
278 |
|
|
{\emph{UcuAtU16LscZyiRAxdAxrRxx(\protect\mbox{\protect\boldmath $\cdot$})}} |
279 |
|
|
%Subsection tag: faa1 |
280 |
|
|
\label{cafn0:slsf0:sfaa1} |
281 |
|
|
|
282 |
|
|
\index{UcuAtU16LscZyiRAxdAxrRxx()@\emph{UcuAtU16LscZyiRAxdAxrRxx($\cdot$)}}% |
283 |
|
|
|
284 |
|
|
\noindent\textbf{PROTOTYPE} |
285 |
|
|
\begin {list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
286 |
|
|
\item |
287 |
|
|
\begin{verbatim} |
288 |
|
|
UCU_UINT16 UcuAtU16LscZyiRAxdAxrRxx( |
289 |
|
|
UCU_UINT16 x, |
290 |
|
|
UCU_UINT16 x_max, |
291 |
|
|
UCU_UINT16 y_max |
292 |
|
|
) |
293 |
|
|
\end{verbatim} |
294 |
|
|
\end{list} |
295 |
|
|
\vspace{2.8ex} |
296 |
|
|
|
297 |
|
|
\noindent\textbf{SYNOPSIS} |
298 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
299 |
|
|
\item Linearly scales from $[0, x_{max}]$ to $[0, y_{max}]$, rounding the result |
300 |
|
|
to the nearest integer with a downward bias. The result calculated is |
301 |
|
|
$\displaystyle{\left\lfloor \frac{y_{max} x + \left\lfloor \displaystyle{\frac{x_{max} - 1}{2}} \right\rfloor}{x_{max}} \right\rfloor}$, |
302 |
|
|
with the provision that the function output will never exceed $y_{max}$. |
303 |
|
|
\end{list} |
304 |
|
|
\vspace{2.8ex} |
305 |
|
|
|
306 |
|
|
\noindent\textbf{INPUTS} |
307 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.5in}\setlength{\itemindent}{-0.25in}\setlength{\topsep}{0.0in}\setlength{\partopsep}{0.0in}} |
308 |
|
|
\item \emph{\textbf{x}}\\ |
309 |
|
|
The input to scale. |
310 |
|
|
\item \emph{\textbf{x\_max}}\\ |
311 |
|
|
The value of $x$ that should correspond to $y_{max}$. |
312 |
|
|
\item \emph{\textbf{y\_max}}\\ |
313 |
|
|
The maximum output value of the function. |
314 |
|
|
\end{list} |
315 |
|
|
\vspace{2.8ex} |
316 |
|
|
|
317 |
|
|
\noindent\textbf{OUTPUT} |
318 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
319 |
|
|
\item $\displaystyle{\left\lfloor \frac{y_{max} x + \left\lfloor \displaystyle{\frac{x_{max} - 1}{2}} \right\rfloor}{x_{max}} \right\rfloor}$, |
320 |
|
|
with a maximum of $y_{max}$. |
321 |
|
|
\end{list} |
322 |
|
|
\vspace{2.8ex} |
323 |
|
|
|
324 |
|
|
\noindent\textbf{EXCEPTION CASES} |
325 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
326 |
|
|
\item If $x>x_{max}$, $y_{max}$ is returned. |
327 |
|
|
\item If $x_{max}=0$ or $y_{max}=0$, 0 is returned. (In either |
328 |
|
|
of these cases, it isn't possible to determine the intent of |
329 |
|
|
the caller, so 0 is the safest return value.) |
330 |
|
|
\end{list} |
331 |
|
|
\vspace{2.8ex} |
332 |
|
|
|
333 |
|
|
\noindent\textbf{INTERRUPT COMPATIBILITY} |
334 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
335 |
|
|
\item This function may be used from both non-ISR and ISR software. |
336 |
|
|
\item This function is thread-safe. |
337 |
|
|
\end{list} |
338 |
|
|
\vspace{2.8ex} |
339 |
|
|
|
340 |
|
|
\noindent\textbf{EXECUTION TIME} |
341 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
342 |
|
|
\item TBD. |
343 |
|
|
\end{list} |
344 |
|
|
\vspace{2.8ex} |
345 |
|
|
|
346 |
|
|
\noindent\textbf{FUNCTION NAME MNEMONIC} |
347 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
348 |
|
|
\item \emph{U16}: operates on UCU\_UINT16 operands. |
349 |
|
|
\emph{Lsc}: linear scaling function. |
350 |
|
|
\emph{Zyi}: zero $y$ intercept. |
351 |
|
|
\emph{R}: result rounded to nearest integer. |
352 |
|
|
\emph{Axd}: arbitrary maxima of domain. |
353 |
|
|
\emph{Axr}: arbitrary maxima of range. |
354 |
|
|
\end{list} |
355 |
|
|
|
356 |
|
|
|
357 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
358 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
359 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
360 |
|
|
\section{Ratiometric Adjustment Functions} |
361 |
|
|
%Section tag: sraf0 |
362 |
|
|
\label{cafn0:sraf0} |
363 |
|
|
|
364 |
|
|
|
365 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
366 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
367 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
368 |
|
|
\subsection[\emph{UcuAtU16RatAdjRRxx(\protect\mbox{\protect$\cdot$})}] |
369 |
|
|
{\emph{UcuAtU16RatAdjRRxx(\protect\mbox{\protect\boldmath $\cdot$})}} |
370 |
|
|
%Subsection tag: rat0 |
371 |
|
|
\label{cafn0:sraf0:srat0} |
372 |
|
|
|
373 |
|
|
\index{UcuAtU16RatAdjRRxx()@\emph{UcuAtU16RatAdjRRxx($\cdot$)}}% |
374 |
|
|
|
375 |
|
|
\noindent\textbf{PROTOTYPE} |
376 |
|
|
\begin {list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
377 |
|
|
\item |
378 |
|
|
\begin{verbatim} |
379 |
|
|
UCU_UINT16 UcuAtU16RatAdjRRxx( |
380 |
|
|
UCU_UINT16 arg, |
381 |
|
|
UCU_UINT16 arg_max, |
382 |
|
|
UCU_UINT16 adj_in, |
383 |
|
|
UCU_UINT16 adj_nom |
384 |
|
|
) |
385 |
|
|
\end{verbatim} |
386 |
|
|
\end{list} |
387 |
|
|
\vspace{2.8ex} |
388 |
|
|
|
389 |
|
|
\noindent\textbf{SYNOPSIS} |
390 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
391 |
|
|
\item Ratiometrically adjusts $arg$ according to the formula |
392 |
|
|
$\displaystyle{\left\lfloor \frac{arg\;adj_{nom} + \left\lfloor \displaystyle{\frac{adj_{in} - 1}{2}} \right\rfloor}{adj_{in}} \right\rfloor}$, |
393 |
|
|
with the result then clipped at $arg_{max}$. |
394 |
|
|
\end{list} |
395 |
|
|
\vspace{2.8ex} |
396 |
|
|
|
397 |
|
|
\noindent\textbf{INPUTS} |
398 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.5in}\setlength{\itemindent}{-0.25in}\setlength{\topsep}{0.0in}\setlength{\partopsep}{0.0in}} |
399 |
|
|
\item \emph{\textbf{arg}}\\ |
400 |
|
|
The input to scale. |
401 |
|
|
\item \emph{\textbf{arg\_max}}\\ |
402 |
|
|
The maximum value of $arg$ that may be returned by the function. |
403 |
|
|
\item \emph{\textbf{adj\_in}}\\ |
404 |
|
|
The value of the adjustment parameter that should be used for calculation. |
405 |
|
|
\item \emph{\textbf{adj\_nom}}\\ |
406 |
|
|
The nominal value of the adjustment parameter that should leave $arg$ unchanged. As |
407 |
|
|
$adj_{in}$ increases, the value returned will decrease, and vice-versa. |
408 |
|
|
\end{list} |
409 |
|
|
\vspace{2.8ex} |
410 |
|
|
|
411 |
|
|
\noindent\textbf{OUTPUT} |
412 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
413 |
|
|
\item $\displaystyle{\left\lfloor \frac{arg\;adj_{nom} + \left\lfloor \displaystyle{\frac{adj_{in} - 1}{2}} \right\rfloor}{adj_{in}} \right\rfloor}$, |
414 |
|
|
with a maximum of $arg_{max}$. |
415 |
|
|
\end{list} |
416 |
|
|
\vspace{2.8ex} |
417 |
|
|
|
418 |
|
|
\noindent\textbf{EXCEPTION CASES} |
419 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
420 |
|
|
\item If $adj_{in}=0$ and $arg=0$, 0 is returned. |
421 |
|
|
\item If $adj_{in}=0$ and $arg>0$, $arg_{max}$ is returned. |
422 |
|
|
\item If $adj_{nom}=0$, 0 is returned. |
423 |
|
|
\end{list} |
424 |
|
|
\vspace{2.8ex} |
425 |
|
|
|
426 |
|
|
\noindent\textbf{INTERRUPT COMPATIBILITY} |
427 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
428 |
|
|
\item This function may be used from both non-ISR and ISR software. |
429 |
|
|
\item This function is thread-safe. |
430 |
|
|
\end{list} |
431 |
|
|
\vspace{2.8ex} |
432 |
|
|
|
433 |
|
|
\noindent\textbf{EXECUTION TIME} |
434 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
435 |
|
|
\item TBD. |
436 |
|
|
\end{list} |
437 |
|
|
\vspace{2.8ex} |
438 |
|
|
|
439 |
|
|
\noindent\textbf{FUNCTION NAME MNEMONIC} |
440 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
441 |
|
|
\item \emph{U16}: operates on UCU\_UINT16 operands. |
442 |
|
|
\emph{RatAdj}: ratiometric adjustment. |
443 |
|
|
\emph{R}: result rounded to nearest integer. |
444 |
|
|
\end{list} |
445 |
|
|
|
446 |
|
|
|
447 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
448 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
449 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
450 |
|
|
\section{Vector Functions, 2-Dimensional} |
451 |
|
|
\label{cafn0:svft0} |
452 |
|
|
|
453 |
|
|
|
454 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
455 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
456 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
457 |
|
|
%\subsection[\emph{UcuAtS32S16v2CpRxx(\protect\mbox{\protect$\cdot$})}] |
458 |
|
|
% {\emph{UcuAtS32S16v2CpRxx(\protect\mbox{\protect\boldmath $\cdot$})}} |
459 |
|
|
%\label{cafn0:svft0:scpt1} |
460 |
|
|
% |
461 |
|
|
%\index{UcuAtS32S16v2CpRxx()@\emph{UcuAtS32S16v2CpRxx($\cdot$)}}% |
462 |
|
|
% |
463 |
|
|
%\noindent\textbf{PROTOTYPE} |
464 |
|
|
%\begin {list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
465 |
|
|
%\item |
466 |
|
|
%\begin{verbatim} |
467 |
|
|
%UCU_SINT32 UcuAtS32S16v2CpRxx( |
468 |
|
|
% UCU_SINT16 a_x, |
469 |
|
|
% UCU_SINT16 a_y, |
470 |
|
|
% UCU_SINT16 b_x, |
471 |
|
|
% UCU_SINT16 b_y |
472 |
|
|
% ) |
473 |
|
|
%\end{verbatim} |
474 |
|
|
%\end{list} |
475 |
|
|
%\vspace{2.8ex} |
476 |
|
|
% |
477 |
|
|
%\noindent\textbf{SYNOPSIS} |
478 |
|
|
%\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
479 |
|
|
%\item Calculates the signed magnitude of the $\hat{k}$-component of the |
480 |
|
|
% cross-product of $\vec{a}$ and $\vec{b}$: |
481 |
|
|
% |
482 |
|
|
% \begin{equation} |
483 |
|
|
% \label{eq:cafn0:svft0:scpt1:01} |
484 |
|
|
% a_x b_y - a_y b_x . |
485 |
|
|
% \end{equation} |
486 |
|
|
%\end{list} |
487 |
|
|
%\vspace{2.8ex} |
488 |
|
|
% |
489 |
|
|
%\noindent\textbf{INPUTS} |
490 |
|
|
%\begin{list}{}{\setlength{\leftmargin}{0.5in}\setlength{\itemindent}{-0.25in}\setlength{\topsep}{0.0in}\setlength{\partopsep}{0.0in}} |
491 |
|
|
%\item \emph{\textbf{a\_x, a\_y, b\_x, b\_y}}\\ |
492 |
|
|
% The $x$ and $y$ components of the two vectors. The correct cross-product |
493 |
|
|
% will be returned over the entire domain of input arguments. |
494 |
|
|
%\end{list} |
495 |
|
|
%\vspace{2.8ex} |
496 |
|
|
% |
497 |
|
|
%\noindent\textbf{OUTPUT} |
498 |
|
|
%\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
499 |
|
|
%\item $a_x b_y - a_y b_x$. |
500 |
|
|
%\end{list} |
501 |
|
|
%\vspace{2.8ex} |
502 |
|
|
% |
503 |
|
|
%\noindent\textbf{EXCEPTION CASES} |
504 |
|
|
%\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
505 |
|
|
%\item None. |
506 |
|
|
%\end{list} |
507 |
|
|
%\vspace{2.8ex} |
508 |
|
|
% |
509 |
|
|
%\noindent\textbf{INTERRUPT COMPATIBILITY} |
510 |
|
|
%\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
511 |
|
|
%\item This function may be used from both non-ISR and ISR software. |
512 |
|
|
%\item This function is thread-safe. |
513 |
|
|
%\end{list} |
514 |
|
|
%\vspace{2.8ex} |
515 |
|
|
% |
516 |
|
|
%\noindent\textbf{EXECUTION TIME} |
517 |
|
|
%\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
518 |
|
|
%\item TBD. |
519 |
|
|
%\end{list} |
520 |
|
|
%\vspace{2.8ex} |
521 |
|
|
% |
522 |
|
|
%\noindent\textbf{FUNCTION NAME MNEMONIC} |
523 |
|
|
%\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
524 |
|
|
%\item \emph{S32}: returned value is a UCU\_SINT32. |
525 |
|
|
% \emph{S16v2}: operates on 2-dimensional vecotrs with UCU\_SINT16 components. |
526 |
|
|
% \emph{Cp}: cross-product. |
527 |
|
|
%\end{list} |
528 |
|
|
%\vspace{2.8ex} |
529 |
|
|
% |
530 |
|
|
%\noindent\textbf{DETAILED DESCRIPTION / ADDITIONAL INFORMATION} |
531 |
|
|
%\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
532 |
|
|
%\item The three-dimensional vector cross product is defined as |
533 |
|
|
% |
534 |
|
|
% \begin{equation} |
535 |
|
|
% \label{eq:cafn0:svft0:scpt1:02} |
536 |
|
|
% \vec{a} \times \vec{b} = \left | |
537 |
|
|
% { |
538 |
|
|
% \begin{array}{ccc} |
539 |
|
|
% \hat{i} & \hat{j} & \hat{k} \\ |
540 |
|
|
% a_x & a_y & a_z \\ |
541 |
|
|
% b_x & b_y & b_z |
542 |
|
|
% \end{array} |
543 |
|
|
% } |
544 |
|
|
% \right |. |
545 |
|
|
% \end{equation} |
546 |
|
|
%\item In two dimensions ($a_z = b_z = 0$), the vector |
547 |
|
|
% cross-product is defined as |
548 |
|
|
% |
549 |
|
|
% \begin{equation} |
550 |
|
|
% \label{eq:cafn0:svft0:scpt1:03} |
551 |
|
|
% \vec{a} \times \vec{b} = \left | |
552 |
|
|
% { |
553 |
|
|
% \begin{array}{ccc} |
554 |
|
|
% \hat{i} & \hat{j} & \hat{k} \\ |
555 |
|
|
% a_x & a_y & 0 \\ |
556 |
|
|
% b_x & b_y & 0 |
557 |
|
|
% \end{array} |
558 |
|
|
% } |
559 |
|
|
% \right | = \hat{k} (a_x b_y - a_y b_x) . |
560 |
|
|
% \end{equation} |
561 |
|
|
% |
562 |
|
|
% This function calculates the magnitude of the $\vec{k}$ component |
563 |
|
|
% of a 3-dimensional vector cross-product when $a_z = b_z = 0$. |
564 |
|
|
%\item This function returns a maximum when $a_x = b_y = a_y = -2^{15}$ |
565 |
|
|
% and $b_x = 2^{15} - 1$, leading to a maximum of $2^{31} - 2^{15}$. |
566 |
|
|
% Similarly, the minimum can be shown to be $-2^{31} + 2^{15}$\@. |
567 |
|
|
% Thus, the calculated result is always exact and always fits in a UCU\_SINT32. |
568 |
|
|
%\end{list} |
569 |
|
|
% |
570 |
|
|
% |
571 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
572 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
573 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
574 |
|
|
\subsection[\emph{UcuAtU16v2CpDiva2FRxx(\protect\mbox{\protect$\cdot$})}] |
575 |
|
|
{\emph{UcuAtU16v2CpDiva2FRxx(\protect\mbox{\protect\boldmath $\cdot$})}} |
576 |
|
|
\label{cafn0:svft0:scpt0} |
577 |
|
|
|
578 |
|
|
\index{UcuAtU16v2CpDiva2FRxx()@\emph{UcuAtU16v2CpDiva2FRxx($\cdot$)}}% |
579 |
|
|
|
580 |
|
|
\noindent\textbf{PROTOTYPE} |
581 |
|
|
\begin {list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
582 |
|
|
\item |
583 |
|
|
\begin{verbatim} |
584 |
|
|
UCU_UINT16 UcuAtU16v2CpDiva2FRxx( |
585 |
|
|
UCU_UINT16 a_x, |
586 |
|
|
UCU_UINT16 a_y, |
587 |
|
|
UCU_UINT16 b_x, |
588 |
|
|
UCU_UINT16 b_y |
589 |
|
|
) |
590 |
|
|
\end{verbatim} |
591 |
|
|
\end{list} |
592 |
|
|
\vspace{2.8ex} |
593 |
|
|
|
594 |
|
|
\noindent\textbf{SYNOPSIS} |
595 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
596 |
|
|
\item Calculates an approximation to |
597 |
|
|
|
598 |
|
|
\begin{equation} |
599 |
|
|
\label{eq:cafn0:svft0:scpt0:01} |
600 |
|
|
\left\lfloor \frac{| \vec{a} \times \vec{b} |}{| \vec{b} |} \right\rfloor |
601 |
|
|
= |
602 |
|
|
\left\lfloor \frac{| \vec{a} | | \vec{b} | \sin \theta}{| \vec{b} |} \right\rfloor , |
603 |
|
|
\end{equation} |
604 |
|
|
|
605 |
|
|
where $\vec{a}$ and $\vec{b}$ are in a special form as described below. |
606 |
|
|
\item This function is a special purpose function and not especially portable. In particular, the design |
607 |
|
|
of the interface is awkward. This function will eventually be replaced in the library. |
608 |
|
|
\end{list} |
609 |
|
|
\vspace{2.8ex} |
610 |
|
|
|
611 |
|
|
\noindent\textbf{INPUTS} |
612 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.5in}\setlength{\itemindent}{-0.25in}\setlength{\topsep}{0.0in}\setlength{\partopsep}{0.0in}} |
613 |
|
|
\item \emph{\textbf{a\_x, a\_y, b\_x, b\_y}}\\ |
614 |
|
|
The $x$ and $y$ components of the two vectors. Each is in ``excess-4096'' format, so that a value of 0 represents -4096, a value of 4096 |
615 |
|
|
represents 0, and a value of 8192 represents 4096. |
616 |
|
|
|
617 |
|
|
Each of these parameters are clipped into [32, 8160] by the function before any calculation |
618 |
|
|
is performed, representing vector component values in [-4064, 4064]. |
619 |
|
|
\end{list} |
620 |
|
|
\vspace{2.8ex} |
621 |
|
|
|
622 |
|
|
\noindent\textbf{OUTPUT} |
623 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
624 |
|
|
\item An approximation of |
625 |
|
|
$\left\lfloor \frac{| \vec{a} \times \vec{b} |}{| \vec{b} |}\right\rfloor |
626 |
|
|
= |
627 |
|
|
\left\lfloor\frac{| \vec{a} | | \vec{b} | \sin \theta}{| \vec{b} |}\right\rfloor$. |
628 |
|
|
The approximation is within several counts of the ideal value. |
629 |
|
|
\end{list} |
630 |
|
|
\vspace{2.8ex} |
631 |
|
|
|
632 |
|
|
\noindent\textbf{EXCEPTION CASES} |
633 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
634 |
|
|
\item If $\vec{b} = \vec{0}$, 0 is returned. |
635 |
|
|
\end{list} |
636 |
|
|
\vspace{2.8ex} |
637 |
|
|
|
638 |
|
|
\noindent\textbf{INTERRUPT COMPATIBILITY} |
639 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
640 |
|
|
\item This function may be used from both non-ISR and ISR software. |
641 |
|
|
\item This function is thread-safe. |
642 |
|
|
\end{list} |
643 |
|
|
\vspace{2.8ex} |
644 |
|
|
|
645 |
|
|
\noindent\textbf{EXECUTION TIME} |
646 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
647 |
|
|
\item TBD. |
648 |
|
|
\end{list} |
649 |
|
|
\vspace{2.8ex} |
650 |
|
|
|
651 |
|
|
\noindent\textbf{FUNCTION NAME MNEMONIC} |
652 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
653 |
|
|
\item \emph{U16v2}: operates on 2-dimensional vecotrs with UCU\_UINT16 components. |
654 |
|
|
\emph{Cp}: cross-product. |
655 |
|
|
\emph{Diva2}: divided by the second argument (the second vector). |
656 |
|
|
\emph{F}: the result is floor'd. |
657 |
|
|
\end{list} |
658 |
|
|
|
659 |
|
|
|
660 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
661 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
662 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
663 |
|
|
%\subsection[\emph{UcuAtS32S16v2CpDiva2FRxx(\protect\mbox{\protect$\cdot$})}] |
664 |
|
|
% {\emph{UcuAtS32S16v2CpDiva2FRxx(\protect\mbox{\protect\boldmath $\cdot$})}} |
665 |
|
|
%\label{cafn0:svft0:scpt2} |
666 |
|
|
% |
667 |
|
|
%\index{UcuAtS32S16v2CpDiva2FRxx()@\emph{UcuAtS32S16v2CpDiva2FRxx($\cdot$)}}% |
668 |
|
|
% |
669 |
|
|
%\noindent\textbf{PROTOTYPE} |
670 |
|
|
%\begin {list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
671 |
|
|
%\item |
672 |
|
|
%\begin{verbatim} |
673 |
|
|
%UCU_SINT32 UcuAtS32S16v2CpDiva2FRxx( |
674 |
|
|
% UCU_SINT16 a_x, |
675 |
|
|
% UCU_SINT16 a_y, |
676 |
|
|
% UCU_SINT16 b_x, |
677 |
|
|
% UCU_SINT16 b_y |
678 |
|
|
% ) |
679 |
|
|
%\end{verbatim} |
680 |
|
|
%\end{list} |
681 |
|
|
%\vspace{2.8ex} |
682 |
|
|
% |
683 |
|
|
%\noindent\textbf{SYNOPSIS} |
684 |
|
|
%\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
685 |
|
|
%\item Calculates |
686 |
|
|
% |
687 |
|
|
% \begin{equation} |
688 |
|
|
% \label{eq:cafn0:svft0:scpt2:01} |
689 |
|
|
% \left\lfloor \frac{\vec{a} \times \vec{b}}{| \vec{b} | \hat{k}} \right\rfloor , |
690 |
|
|
% \end{equation} |
691 |
|
|
% |
692 |
|
|
% where the floor function rounds negative values towards zero. It should be noted that by definition |
693 |
|
|
% |
694 |
|
|
% \begin{equation} |
695 |
|
|
% \label{eq:cafn0:svft0:scpt2:02} |
696 |
|
|
% \left\lfloor \left| \frac{\vec{a} \times \vec{b}}{| \vec{b} | \hat{k}} \right| \right\rfloor |
697 |
|
|
% = |
698 |
|
|
% \lfloor |\vec{a}| \sin \theta \rfloor , |
699 |
|
|
% \end{equation} |
700 |
|
|
% |
701 |
|
|
% where $\theta$ is the angle between $\vec{a}$ and $\vec{b}$, $0 \leq \theta \leq \pi$, |
702 |
|
|
% so that this function provides an excellent approximation to |
703 |
|
|
% $\lfloor |\vec{a}| \sin \theta \rfloor$. |
704 |
|
|
%\item For two vectors $\vec{a}$ and $\vec{b}$ that both begin at the origin, |
705 |
|
|
% the absolute value of this function's return value is |
706 |
|
|
% the floor of the shortest distance between the tip of $\vec{a}$ and the line coincident with |
707 |
|
|
% $\vec{b}$. |
708 |
|
|
%\item The precise calculation method used by this function is described in |
709 |
|
|
% \S{}\ref{ctbg0:svec2} (p. \pageref{ctbg0:svec2}). |
710 |
|
|
%\end{list} |
711 |
|
|
%\vspace{2.8ex} |
712 |
|
|
% |
713 |
|
|
%\noindent\textbf{INPUTS} |
714 |
|
|
%\begin{list}{}{\setlength{\leftmargin}{0.5in}\setlength{\itemindent}{-0.25in}\setlength{\topsep}{0.0in}\setlength{\partopsep}{0.0in}} |
715 |
|
|
%\item \emph{\textbf{a\_x, a\_y, b\_x, b\_y}}\\ |
716 |
|
|
% The $x$ and $y$ components of the two vectors. All components are signed, and this function |
717 |
|
|
% will return correct results over the entire input domain. |
718 |
|
|
%\end{list} |
719 |
|
|
%\vspace{2.8ex} |
720 |
|
|
% |
721 |
|
|
%\noindent\textbf{OUTPUT} |
722 |
|
|
%\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
723 |
|
|
%\item $\displaystyle{\left\lfloor \frac{\vec{a} \times \vec{b}}{| \vec{b} | \hat{k}} \right\rfloor}$, |
724 |
|
|
% where the floor function rounds negative values towards zero. |
725 |
|
|
%\end{list} |
726 |
|
|
%\vspace{2.8ex} |
727 |
|
|
% |
728 |
|
|
%\noindent\textbf{EXCEPTION CASES} |
729 |
|
|
%\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
730 |
|
|
%\item None. |
731 |
|
|
%\end{list} |
732 |
|
|
%\vspace{2.8ex} |
733 |
|
|
% |
734 |
|
|
%\noindent\textbf{INTERRUPT COMPATIBILITY} |
735 |
|
|
%\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
736 |
|
|
%\item This function may be used from both non-ISR and ISR software. |
737 |
|
|
%\item This function is thread-safe. |
738 |
|
|
%\end{list} |
739 |
|
|
%\vspace{2.8ex} |
740 |
|
|
% |
741 |
|
|
%\noindent\textbf{EXECUTION TIME} |
742 |
|
|
%\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
743 |
|
|
%\item TBD. |
744 |
|
|
%\end{list} |
745 |
|
|
%\vspace{2.8ex} |
746 |
|
|
% |
747 |
|
|
%\noindent\textbf{FUNCTION NAME MNEMONIC} |
748 |
|
|
%\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
749 |
|
|
%\item \emph{S32}: the return value is UCU\_SINT32. |
750 |
|
|
% \emph{S16v2}: operates on 2-dimensional vectors with UCU\_SINT16 components. |
751 |
|
|
% \emph{Cp}: cross-product. |
752 |
|
|
% \emph{Diva2}: divided by the second argument (the second vector). |
753 |
|
|
% \emph{F}: the result is floor'd. |
754 |
|
|
%\end{list} |
755 |
|
|
% |
756 |
|
|
% |
757 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
758 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
759 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
760 |
|
|
%\subsection[\emph{UcuAtU32S16v2MagSquaredRxx(\protect\mbox{\protect$\cdot$})}] |
761 |
|
|
% {\emph{UcuAtU32S16v2MagSquaredRxx(\protect\mbox{\protect\boldmath $\cdot$})}} |
762 |
|
|
%\label{cafn0:svft0:svmf0} |
763 |
|
|
% |
764 |
|
|
%\index{UcuAtU32S16v2MagSquaredRxx()@\emph{UcuAtU32S16v2MagSquaredRxx($\cdot$)}}% |
765 |
|
|
% |
766 |
|
|
%\noindent\textbf{PROTOTYPE} |
767 |
|
|
%\begin {list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
768 |
|
|
%\item |
769 |
|
|
%\begin{verbatim} |
770 |
|
|
%UCU_UINT32 UcuAtU32S16v2MagSquaredRxx( |
771 |
|
|
% UCU_SINT16 a_x, |
772 |
|
|
% UCU_SINT16 a_y |
773 |
|
|
% ) |
774 |
|
|
%\end{verbatim} |
775 |
|
|
%\end{list} |
776 |
|
|
%\vspace{2.8ex} |
777 |
|
|
% |
778 |
|
|
%\noindent\textbf{SYNOPSIS} |
779 |
|
|
%\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
780 |
|
|
%\item Calculates $a_x^2 + a_y^2$. |
781 |
|
|
%\item The maximum value of $a_x^2 + a_y^2$ is $2(2^{15})^2$ = $2^{31}$, |
782 |
|
|
% so the return value of this function may exceed the maximum value |
783 |
|
|
% of an UCU\_SINT32, hence the return type UCU\_UINT32 is necessary, |
784 |
|
|
% and the result of this function may not be safely cast to |
785 |
|
|
% UCU\_SINT32. |
786 |
|
|
%\end{list} |
787 |
|
|
%\vspace{2.8ex} |
788 |
|
|
% |
789 |
|
|
%\noindent\textbf{INPUTS} |
790 |
|
|
%\begin{list}{}{\setlength{\leftmargin}{0.5in}\setlength{\itemindent}{-0.25in}\setlength{\topsep}{0.0in}\setlength{\partopsep}{0.0in}} |
791 |
|
|
%\item \emph{\textbf{a\_x, a\_y}}\\ |
792 |
|
|
% The $x$ and $y$ components of a vector. The components are signed, and this function |
793 |
|
|
% will return correct results over the entire input domain. |
794 |
|
|
%\end{list} |
795 |
|
|
%\vspace{2.8ex} |
796 |
|
|
% |
797 |
|
|
%\noindent\textbf{OUTPUT} |
798 |
|
|
%\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
799 |
|
|
%\item $a_x^2 + a_y^2$. |
800 |
|
|
%\end{list} |
801 |
|
|
%\vspace{2.8ex} |
802 |
|
|
% |
803 |
|
|
%\noindent\textbf{EXCEPTION CASES} |
804 |
|
|
%\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
805 |
|
|
%\item None. |
806 |
|
|
%\end{list} |
807 |
|
|
%\vspace{2.8ex} |
808 |
|
|
% |
809 |
|
|
%\noindent\textbf{INTERRUPT COMPATIBILITY} |
810 |
|
|
%\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
811 |
|
|
%\item This function may be used from both non-ISR and ISR software. |
812 |
|
|
%\item This function is thread-safe. |
813 |
|
|
%\end{list} |
814 |
|
|
%\vspace{2.8ex} |
815 |
|
|
% |
816 |
|
|
%\noindent\textbf{EXECUTION TIME} |
817 |
|
|
%\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
818 |
|
|
%\item TBD. |
819 |
|
|
%\end{list} |
820 |
|
|
%\vspace{2.8ex} |
821 |
|
|
% |
822 |
|
|
%\noindent\textbf{FUNCTION NAME MNEMONIC} |
823 |
|
|
%\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
824 |
|
|
%\item \emph{U32}: the return value is UCU\_UINT32. |
825 |
|
|
% \emph{S16v2}: operates on 2-dimensional vectors with UCU\_SINT16 components. |
826 |
|
|
% \emph{MagSquared}: returns the vector magnitude squared. |
827 |
|
|
%\end{list} |
828 |
|
|
% |
829 |
|
|
% |
830 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
831 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
832 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
833 |
|
|
\section{Square Root Extraction Functions} |
834 |
|
|
%Section tag: sre0 |
835 |
|
|
\label{cafn0:ssre0} |
836 |
|
|
|
837 |
|
|
|
838 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
839 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
840 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
841 |
|
|
\subsection[\emph{UcuAtU8SqrtFRxx(\protect\mbox{\protect$\cdot$})}] |
842 |
|
|
{\emph{UcuAtU8SqrtFRxx(\protect\mbox{\protect\boldmath $\cdot$})}} |
843 |
|
|
%Subsection tag: lcp0 |
844 |
|
|
\label{cafn0:ssre0:suee0} |
845 |
|
|
|
846 |
|
|
\index{UcuAtU8SqrtFRxx()@\emph{UcuAtU8SqrtFRxx($\cdot$)}}% |
847 |
|
|
|
848 |
|
|
\noindent\textbf{PROTOTYPE} |
849 |
|
|
\begin {list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
850 |
|
|
\item |
851 |
|
|
\begin{verbatim} |
852 |
|
|
UCU_UINT8 UcuAtU8SqrtFRxx( UCU_UINT8 x ) |
853 |
|
|
\end{verbatim} |
854 |
|
|
\end{list} |
855 |
|
|
\vspace{2.8ex} |
856 |
|
|
|
857 |
|
|
\noindent\textbf{SYNOPSIS} |
858 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
859 |
|
|
\item |
860 |
|
|
Calculates $\lfloor \sqrt{x} \rfloor$ using a 4-iteration |
861 |
|
|
trial squaring algorithm. |
862 |
|
|
\end{list} |
863 |
|
|
\vspace{2.8ex} |
864 |
|
|
|
865 |
|
|
\noindent\textbf{INPUT} |
866 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.5in}\setlength{\itemindent}{-0.25in}\setlength{\topsep}{0.0in}\setlength{\partopsep}{0.0in}} |
867 |
|
|
\item \emph{\textbf{x}}\\ |
868 |
|
|
The unsigned 8-bit integer whose square root is to be calculated. |
869 |
|
|
\end{list} |
870 |
|
|
\vspace{2.8ex} |
871 |
|
|
|
872 |
|
|
\noindent\textbf{OUTPUT} |
873 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
874 |
|
|
\item $\lfloor \sqrt{x} \rfloor$. |
875 |
|
|
\end{list} |
876 |
|
|
\vspace{2.8ex} |
877 |
|
|
|
878 |
|
|
\noindent\textbf{INTERRUPT COMPATIBILITY} |
879 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
880 |
|
|
\item This function may be used from both non-ISR and ISR software. |
881 |
|
|
\item This function is thread-safe. |
882 |
|
|
\end{list} |
883 |
|
|
\vspace{2.8ex} |
884 |
|
|
|
885 |
|
|
\noindent\textbf{EXECUTION TIME} |
886 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
887 |
|
|
\item TBD. |
888 |
|
|
\end{list} |
889 |
|
|
\vspace{2.8ex} |
890 |
|
|
|
891 |
|
|
\noindent\textbf{FUNCTION NAME MNEMONIC} |
892 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
893 |
|
|
\item \emph{U8}: operates on UCU\_UINT8 operands. |
894 |
|
|
\emph{Sqrt}: square root. |
895 |
|
|
\emph{F}: result is floor'd. |
896 |
|
|
\end{list} |
897 |
|
|
|
898 |
|
|
|
899 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
900 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
901 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
902 |
|
|
\subsection[\emph{UcuAtU16SqrtFRxx(\protect\mbox{\protect$\cdot$})}] |
903 |
|
|
{\emph{UcuAtU16SqrtFRxx(\protect\mbox{\protect\boldmath $\cdot$})}} |
904 |
|
|
\label{cafn0:ssre0:suee1} |
905 |
|
|
|
906 |
|
|
\index{UcuAtU16SqrtFRxx()@\emph{UcuAtU16SqrtFRxx($\cdot$)}}% |
907 |
|
|
|
908 |
|
|
\noindent\textbf{PROTOTYPE} |
909 |
|
|
\begin {list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
910 |
|
|
\item |
911 |
|
|
\begin{verbatim} |
912 |
|
|
UCU_UINT8 UcuAtU16SqrtFRxx( UCU_UINT16 x ) |
913 |
|
|
\end{verbatim} |
914 |
|
|
\end{list} |
915 |
|
|
\vspace{2.8ex} |
916 |
|
|
|
917 |
|
|
\noindent\textbf{SYNOPSIS} |
918 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
919 |
|
|
\item |
920 |
|
|
Calculates $\lfloor \sqrt{x} \rfloor$ using an 8-iteration |
921 |
|
|
trial squaring algorithm. |
922 |
|
|
\end{list} |
923 |
|
|
\vspace{2.8ex} |
924 |
|
|
|
925 |
|
|
\noindent\textbf{INPUT} |
926 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.5in}\setlength{\itemindent}{-0.25in}\setlength{\topsep}{0.0in}\setlength{\partopsep}{0.0in}} |
927 |
|
|
\item \emph{\textbf{x}}\\ |
928 |
|
|
The unsigned 16-bit integer whose square root is to be calculated. |
929 |
|
|
\end{list} |
930 |
|
|
\vspace{2.8ex} |
931 |
|
|
|
932 |
|
|
\noindent\textbf{OUTPUT} |
933 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
934 |
|
|
\item $\lfloor \sqrt{x} \rfloor$. |
935 |
|
|
\end{list} |
936 |
|
|
\vspace{2.8ex} |
937 |
|
|
|
938 |
|
|
\noindent\textbf{INTERRUPT COMPATIBILITY} |
939 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
940 |
|
|
\item This function may be used from both non-ISR and ISR software. |
941 |
|
|
\item This function is thread-safe. |
942 |
|
|
\end{list} |
943 |
|
|
\vspace{2.8ex} |
944 |
|
|
|
945 |
|
|
\noindent\textbf{EXECUTION TIME} |
946 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
947 |
|
|
\item TBD. |
948 |
|
|
\end{list} |
949 |
|
|
\vspace{2.8ex} |
950 |
|
|
|
951 |
|
|
\noindent\textbf{FUNCTION NAME MNEMONIC} |
952 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
953 |
|
|
\item \emph{U16}: operates on UCU\_UINT16 operands. |
954 |
|
|
\emph{Sqrt}: square root. |
955 |
|
|
\emph{F}: result is floor'd. |
956 |
|
|
\end{list} |
957 |
|
|
|
958 |
|
|
|
959 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
960 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
961 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
962 |
|
|
\subsection[\emph{UcuAtU16SqrtX10FRxx(\protect\mbox{\protect$\cdot$})}] |
963 |
|
|
{\emph{UcuAtU16SqrtX10FRxx(\protect\mbox{\protect\boldmath $\cdot$})}} |
964 |
|
|
\label{cafn0:ssre0:suee2} |
965 |
|
|
|
966 |
|
|
\index{UcuAtU16SqrtX10FRxx()@\emph{UcuAtU16SqrtX10FRxx($\cdot$)}}% |
967 |
|
|
|
968 |
|
|
\noindent\textbf{PROTOTYPE} |
969 |
|
|
\begin {list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
970 |
|
|
\item |
971 |
|
|
\begin{verbatim} |
972 |
|
|
UCU_UINT16 UcuAtU16SqrtX10FRxx( UCU_UINT16 val ) |
973 |
|
|
\end{verbatim} |
974 |
|
|
\end{list} |
975 |
|
|
\vspace{2.8ex} |
976 |
|
|
|
977 |
|
|
\noindent\textbf{SYNOPSIS} |
978 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
979 |
|
|
\item |
980 |
|
|
Calculates an approximation to $10 \sqrt{x}$ using the Babylonian method. |
981 |
|
|
The value returned will be either $\lfloor 10 \sqrt{x} \rfloor$ |
982 |
|
|
or $\lfloor 10 \sqrt{x} \rfloor + 1$. |
983 |
|
|
\end{list} |
984 |
|
|
\vspace{2.8ex} |
985 |
|
|
|
986 |
|
|
\noindent\textbf{INPUT} |
987 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.5in}\setlength{\itemindent}{-0.25in}\setlength{\topsep}{0.0in}\setlength{\partopsep}{0.0in}} |
988 |
|
|
\item \emph{\textbf{x}}\\ |
989 |
|
|
The unsigned 16-bit integer whose square root is to be calculated. |
990 |
|
|
\end{list} |
991 |
|
|
\vspace{2.8ex} |
992 |
|
|
|
993 |
|
|
\noindent\textbf{OUTPUT} |
994 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
995 |
|
|
\item $\lfloor 10 \sqrt{x} \rfloor$ or $\lfloor 10 \sqrt{x} \rfloor + 1$. There is |
996 |
|
|
no rule as to which will be returned (i.e. the value returned does not |
997 |
|
|
represent rounding). The possibility of returning either value is tied |
998 |
|
|
to the algorithm used.\footnote{This is a to-do item for this function. |
999 |
|
|
It should be modified to return $\lfloor 10 \sqrt{x} \rfloor$ in |
1000 |
|
|
all cases. Alternate algorithms should also be explored (for speed).} |
1001 |
|
|
\item This function is known to return a maximum of 2,559, |
1002 |
|
|
corresponding to $x = 65535$. |
1003 |
|
|
\end{list} |
1004 |
|
|
\vspace{2.8ex} |
1005 |
|
|
|
1006 |
|
|
\noindent\textbf{INTERRUPT COMPATIBILITY} |
1007 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
1008 |
|
|
\item This function may be used from both non-ISR and ISR software. |
1009 |
|
|
\item This function is thread-safe. |
1010 |
|
|
\end{list} |
1011 |
|
|
\vspace{2.8ex} |
1012 |
|
|
|
1013 |
|
|
\noindent\textbf{EXECUTION TIME} |
1014 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
1015 |
|
|
\item TBD. |
1016 |
|
|
\end{list} |
1017 |
|
|
\vspace{2.8ex} |
1018 |
|
|
|
1019 |
|
|
\noindent\textbf{FUNCTION NAME MNEMONIC} |
1020 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
1021 |
|
|
\item \emph{U16}: operates on UCU\_UINT16 operands. |
1022 |
|
|
\emph{Sqrt}: square root. |
1023 |
|
|
\emph{X10}: result is multiplied by 10. |
1024 |
|
|
\emph{F}: result is floor'd. |
1025 |
|
|
\end{list} |
1026 |
|
|
|
1027 |
|
|
|
1028 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
1029 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
1030 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
1031 |
|
|
%\subsection[\emph{UcuAtU32SqrtFRxx(\protect\mbox{\protect$\cdot$})}] |
1032 |
|
|
% {\emph{UcuAtU32SqrtFRxx(\protect\mbox{\protect\boldmath $\cdot$})}} |
1033 |
|
|
%\label{cafn0:ssre0:suee5} |
1034 |
|
|
% |
1035 |
|
|
%\index{UcuAtU32SqrtFRxx()@\emph{UcuAtU32SqrtFRxx($\cdot$)}}% |
1036 |
|
|
% |
1037 |
|
|
%\noindent\textbf{PROTOTYPE} |
1038 |
|
|
%\begin {list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
1039 |
|
|
%\item |
1040 |
|
|
%\begin{verbatim} |
1041 |
|
|
%UCU_UINT16 UcuAtU32SqrtFRxx( UCU_UINT32 x ) |
1042 |
|
|
%\end{verbatim} |
1043 |
|
|
%\end{list} |
1044 |
|
|
%\vspace{2.8ex} |
1045 |
|
|
% |
1046 |
|
|
%\noindent\textbf{SYNOPSIS} |
1047 |
|
|
%\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
1048 |
|
|
%\item |
1049 |
|
|
%Calculates $\lfloor \sqrt{x} \rfloor$ using a 16-iteration |
1050 |
|
|
%trial squaring algorithm. |
1051 |
|
|
%\end{list} |
1052 |
|
|
%\vspace{2.8ex} |
1053 |
|
|
% |
1054 |
|
|
%\noindent\textbf{INPUT} |
1055 |
|
|
%\begin{list}{}{\setlength{\leftmargin}{0.5in}\setlength{\itemindent}{-0.25in}\setlength{\topsep}{0.0in}\setlength{\partopsep}{0.0in}} |
1056 |
|
|
%\item \emph{\textbf{x}}\\ |
1057 |
|
|
% The unsigned 32-bit integer whose square root is to be calculated. |
1058 |
|
|
%\end{list} |
1059 |
|
|
%\vspace{2.8ex} |
1060 |
|
|
% |
1061 |
|
|
%\noindent\textbf{OUTPUT} |
1062 |
|
|
%\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
1063 |
|
|
%\item $\lfloor \sqrt{x} \rfloor$. |
1064 |
|
|
%\end{list} |
1065 |
|
|
%\vspace{2.8ex} |
1066 |
|
|
% |
1067 |
|
|
%\noindent\textbf{INTERRUPT COMPATIBILITY} |
1068 |
|
|
%\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
1069 |
|
|
%\item This function may be used from both non-ISR and ISR software. |
1070 |
|
|
%\item This function is thread-safe. |
1071 |
|
|
%\end{list} |
1072 |
|
|
%\vspace{2.8ex} |
1073 |
|
|
% |
1074 |
|
|
%\noindent\textbf{EXECUTION TIME} |
1075 |
|
|
%\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
1076 |
|
|
%\item TBD. |
1077 |
|
|
%\end{list} |
1078 |
|
|
%\vspace{2.8ex} |
1079 |
|
|
% |
1080 |
|
|
%\noindent\textbf{FUNCTION NAME MNEMONIC} |
1081 |
|
|
%\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
1082 |
|
|
%\item \emph{U32}: operates on UCU\_UINT32 operands. |
1083 |
|
|
% \emph{Sqrt}: square root. |
1084 |
|
|
% \emph{F}: result is floor'd. |
1085 |
|
|
%\end{list} |
1086 |
|
|
% |
1087 |
|
|
% |
1088 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
1089 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
1090 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
1091 |
|
|
%\section{Sign Determination Functions} |
1092 |
|
|
%\label{cafn0:ssdf0} |
1093 |
|
|
% |
1094 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
1095 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
1096 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
1097 |
|
|
%\subsection[\emph{UcuAtS32IsNegRxx(\protect\mbox{\protect$\cdot$})}] |
1098 |
|
|
% {\emph{UcuAtS32IsNegRxx(\protect\mbox{\protect\boldmath $\cdot$})}} |
1099 |
|
|
%\label{cafn0:ssdf0:sisn0} |
1100 |
|
|
% |
1101 |
|
|
%\index{UcuAtS32IsNegRxx()@\emph{UcuAtS32IsNegRxx($\cdot$)}}% |
1102 |
|
|
% |
1103 |
|
|
%\noindent\textbf{PROTOTYPE} |
1104 |
|
|
%\begin {list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
1105 |
|
|
%\item |
1106 |
|
|
%\begin{verbatim} |
1107 |
|
|
%UCU_BOOLEAN UcuAtS32IsNegRxx( UCU_SINT32 x ) |
1108 |
|
|
%\end{verbatim} |
1109 |
|
|
%\end{list} |
1110 |
|
|
%\vspace{2.8ex} |
1111 |
|
|
% |
1112 |
|
|
%\noindent\textbf{SYNOPSIS} |
1113 |
|
|
%\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
1114 |
|
|
%\item |
1115 |
|
|
%Returns UCU\_TRUE if $x<0$ or UCU\_FALSE otherwise. |
1116 |
|
|
%\end{list} |
1117 |
|
|
%\vspace{2.8ex} |
1118 |
|
|
% |
1119 |
|
|
%\noindent\textbf{INPUT} |
1120 |
|
|
%\begin{list}{}{\setlength{\leftmargin}{0.5in}\setlength{\itemindent}{-0.25in}\setlength{\topsep}{0.0in}\setlength{\partopsep}{0.0in}} |
1121 |
|
|
%\item \emph{\textbf{x}}\\ |
1122 |
|
|
% The signed 32-bit integer to be tested for negativity. |
1123 |
|
|
%\end{list} |
1124 |
|
|
%\vspace{2.8ex} |
1125 |
|
|
% |
1126 |
|
|
%\noindent\textbf{OUTPUT} |
1127 |
|
|
%\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
1128 |
|
|
%\item UCU\_TRUE if $x<0$ or UCU\_FALSE otherwise. |
1129 |
|
|
%\end{list} |
1130 |
|
|
%\vspace{2.8ex} |
1131 |
|
|
% |
1132 |
|
|
%\noindent\textbf{INTERRUPT COMPATIBILITY} |
1133 |
|
|
%\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
1134 |
|
|
%\item This function may be used from both non-ISR and ISR software. |
1135 |
|
|
%\item This function is thread-safe. |
1136 |
|
|
%\end{list} |
1137 |
|
|
%\vspace{2.8ex} |
1138 |
|
|
% |
1139 |
|
|
%\noindent\textbf{EXECUTION TIME} |
1140 |
|
|
%\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
1141 |
|
|
%\item TBD. |
1142 |
|
|
%\end{list} |
1143 |
|
|
%\vspace{2.8ex} |
1144 |
|
|
% |
1145 |
|
|
%\noindent\textbf{FUNCTION NAME MNEMONIC} |
1146 |
|
|
%\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
1147 |
|
|
%\item \emph{S32}: operates on UCU\_SINT32 operands. |
1148 |
|
|
% \emph{IsNeg}: tests if the argument \emph{is} \emph{neg}ative. |
1149 |
|
|
%\end{list} |
1150 |
|
|
% |
1151 |
|
|
% |
1152 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
1153 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
1154 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
1155 |
|
|
\section{Trigonometric Functions} |
1156 |
|
|
\label{cafn0:strf0} |
1157 |
|
|
|
1158 |
|
|
|
1159 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
1160 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
1161 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
1162 |
|
|
\subsection[\emph{UcuAtAtanIx100Odegx1RRxx(\protect\mbox{\protect$\cdot$})}] |
1163 |
|
|
{\emph{UcuAtAtanIx100Odegx1RRxx(\protect\mbox{\protect\boldmath $\cdot$})}} |
1164 |
|
|
\label{cafn0:strf0:sata0} |
1165 |
|
|
|
1166 |
|
|
\index{UcuAtAtanIx100Odegx1RRxx()@\emph{UcuAtAtanIx100Odegx1RRxx($\cdot$)}}% |
1167 |
|
|
|
1168 |
|
|
\noindent\textbf{PROTOTYPE} |
1169 |
|
|
\begin {list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
1170 |
|
|
\item |
1171 |
|
|
\begin{verbatim} |
1172 |
|
|
UCU_UINT8 UcuAtAtanIx100Odegx1RRxx( UCU_UINT16 x ) |
1173 |
|
|
\end{verbatim} |
1174 |
|
|
\end{list} |
1175 |
|
|
\vspace{2.8ex} |
1176 |
|
|
|
1177 |
|
|
\noindent\textbf{SYNOPSIS} |
1178 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
1179 |
|
|
\item Calculates $\tan{}^{-1}x$ to 1-degree precision in the first quadrant |
1180 |
|
|
only using a binary search on an internal 90-element lookup table. |
1181 |
|
|
\end{list} |
1182 |
|
|
\vspace{2.8ex} |
1183 |
|
|
|
1184 |
|
|
\noindent\textbf{INPUT} |
1185 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.5in}\setlength{\itemindent}{-0.25in}\setlength{\topsep}{0.0in}\setlength{\partopsep}{0.0in}} |
1186 |
|
|
\item \emph{\textbf{x}}\\ |
1187 |
|
|
100 times the tangent whose arctangent is to be calculated. |
1188 |
|
|
For example, 0.58 would be supplied to this function |
1189 |
|
|
as $x=58$. |
1190 |
|
|
\end{list} |
1191 |
|
|
\vspace{2.8ex} |
1192 |
|
|
|
1193 |
|
|
\noindent\textbf{OUTPUT} |
1194 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
1195 |
|
|
\item $\tan{}^{-1}x$, in the first quadrant, rounded approximately to the |
1196 |
|
|
nearest degree. |
1197 |
|
|
\end{list} |
1198 |
|
|
\vspace{2.8ex} |
1199 |
|
|
|
1200 |
|
|
\noindent\textbf{EXCEPTION CASES} |
1201 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
1202 |
|
|
\item This function returns the expected value for all input arguments, |
1203 |
|
|
so there are no exception cases. |
1204 |
|
|
Input arguments from 11459 through $2^{16}-1$ will result |
1205 |
|
|
in a returned value of 90.\footnote{The tangent of 89.5 degrees is approximately 114.5887, |
1206 |
|
|
so an input argument of 11458 will result in a return value of 89, while an |
1207 |
|
|
input argument of 11459 will result in a return value of 90.} |
1208 |
|
|
\end{list} |
1209 |
|
|
\vspace{2.8ex} |
1210 |
|
|
|
1211 |
|
|
\noindent\textbf{INTERRUPT COMPATIBILITY} |
1212 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
1213 |
|
|
\item This function may be used from both non-ISR and ISR software. |
1214 |
|
|
\item This function is thread-safe. |
1215 |
|
|
\end{list} |
1216 |
|
|
\vspace{2.8ex} |
1217 |
|
|
|
1218 |
|
|
\noindent\textbf{EXECUTION TIME} |
1219 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
1220 |
|
|
\item TBD. |
1221 |
|
|
\end{list} |
1222 |
|
|
\vspace{2.8ex} |
1223 |
|
|
|
1224 |
|
|
\noindent\textbf{FUNCTION NAME MNEMONIC} |
1225 |
|
|
\begin{list}{}{\setlength{\leftmargin}{0.25in}\setlength{\topsep}{0.0in}} |
1226 |
|
|
\item \emph{Atan}: arctangent. |
1227 |
|
|
\emph{Ix100}: input $\times$ 100. |
1228 |
|
|
\emph{Odegx1}: output in degrees $\times$ 1. |
1229 |
|
|
\emph{R}: rounded (to nearest degree). |
1230 |
|
|
\end{list} |
1231 |
|
|
|
1232 |
|
|
|
1233 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
1234 |
|
|
\noindent\begin{figure}[!b] |
1235 |
|
|
\noindent\rule[-0.25in]{\textwidth}{1pt} |
1236 |
|
|
\begin{tiny} |
1237 |
|
|
\begin{verbatim} |
1238 |
|
|
$RCSfile: c_afn0.tex,v $ |
1239 |
|
|
$Source: /home/dashley/cvsrep/uculib01/uculib01/doc/manual/c_afn0/c_afn0.tex,v $ |
1240 |
|
|
$Revision: 1.37 $ |
1241 |
|
|
$Author: dashley $ |
1242 |
|
|
$Date: 2010/05/12 18:35:49 $ |
1243 |
|
|
\end{verbatim} |
1244 |
|
|
\end{tiny} |
1245 |
|
|
\noindent\rule[0.25in]{\textwidth}{1pt} |
1246 |
|
|
\end{figure} |
1247 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
1248 |
|
|
%$Log: c_afn0.tex,v $ |
1249 |
|
|
%Revision 1.37 2010/05/12 18:35:49 dashley |
1250 |
|
|
%Removal of UcuAtS32S16v2CpDiva2FRxx() function. |
1251 |
|
|
% |
1252 |
|
|
%Revision 1.36 2010/05/12 18:29:49 dashley |
1253 |
|
|
%Removal of UcuAtS32S16v2CpRxx() function. |
1254 |
|
|
% |
1255 |
|
|
%Revision 1.35 2010/05/12 17:20:51 dashley |
1256 |
|
|
%Removal of UcuAtS32NegationRxx() function. |
1257 |
|
|
% |
1258 |
|
|
%Revision 1.34 2010/05/12 17:16:47 dashley |
1259 |
|
|
%Removal of UcuAtU32S16v2MagSquaredRxx() function. |
1260 |
|
|
% |
1261 |
|
|
%Revision 1.33 2010/05/12 17:09:42 dashley |
1262 |
|
|
%UcuAtS32IsNegRxx() function backed out. |
1263 |
|
|
% |
1264 |
|
|
%Revision 1.32 2010/05/12 17:04:17 dashley |
1265 |
|
|
%UcuAtU32SqrtFRxx() function backed out. This function is not yet |
1266 |
|
|
%implemented. |
1267 |
|
|
% |
1268 |
|
|
%Revision 1.31 2010/04/16 19:35:41 dashley |
1269 |
|
|
%Missing word added. |
1270 |
|
|
% |
1271 |
|
|
%Revision 1.30 2010/04/16 19:33:37 dashley |
1272 |
|
|
%Addition of UcuAtS32NegationRxx() function. |
1273 |
|
|
% |
1274 |
|
|
%Revision 1.29 2010/04/15 20:21:07 dashley |
1275 |
|
|
%Typo corrected. |
1276 |
|
|
% |
1277 |
|
|
%Revision 1.28 2010/04/15 19:34:39 dashley |
1278 |
|
|
%Addition of UcuAtU32S16v2MagSquaredRxx() function. |
1279 |
|
|
% |
1280 |
|
|
%Revision 1.27 2010/04/15 17:34:52 dashley |
1281 |
|
|
%Addition of UcuAtS32IsNegRxx() function. |
1282 |
|
|
% |
1283 |
|
|
%Revision 1.26 2010/04/15 14:56:28 dashley |
1284 |
|
|
%Addition of UcuAtU32SqrtFRxx() function. |
1285 |
|
|
% |
1286 |
|
|
%Revision 1.25 2010/04/14 14:29:47 dashley |
1287 |
|
|
%Incorrect equation labels changed. |
1288 |
|
|
% |
1289 |
|
|
%Revision 1.24 2010/04/05 15:13:50 dashley |
1290 |
|
|
%Edits. |
1291 |
|
|
% |
1292 |
|
|
%Revision 1.23 2010/04/05 13:22:09 dashley |
1293 |
|
|
%Function documentation updated. |
1294 |
|
|
% |
1295 |
|
|
%Revision 1.22 2010/04/01 20:21:50 dashley |
1296 |
|
|
%Edits. |
1297 |
|
|
% |
1298 |
|
|
%Revision 1.21 2010/04/01 14:49:25 dashley |
1299 |
|
|
%Addition of UcuAtS32S16v2CpRxx() function. |
1300 |
|
|
% |
1301 |
|
|
%Revision 1.20 2010/02/20 16:55:52 dashley |
1302 |
|
|
%Function added. |
1303 |
|
|
% |
1304 |
|
|
%Revision 1.19 2010/02/19 17:12:55 dashley |
1305 |
|
|
%Function added. |
1306 |
|
|
% |
1307 |
|
|
%Revision 1.18 2010/02/18 17:05:57 dashley |
1308 |
|
|
%Edits. |
1309 |
|
|
% |
1310 |
|
|
%Revision 1.17 2010/02/17 19:07:34 dashley |
1311 |
|
|
%Documentation added. |
1312 |
|
|
% |
1313 |
|
|
%Revision 1.16 2010/02/16 23:38:42 dashley |
1314 |
|
|
%Description of Sqrtx10 function corrected. |
1315 |
|
|
% |
1316 |
|
|
%Revision 1.15 2010/02/15 20:33:56 dashley |
1317 |
|
|
%Minor typo corrected. |
1318 |
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
1319 |
|
|
|