forked from johannesgerer/jburkardt-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcordic.html
262 lines (233 loc) · 6.95 KB
/
cordic.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
<html>
<head>
<title>
CORDIC - Approximation of Elementary Functions
</title>
</head>
<body bgcolor="#eeeeee" link="#cc0000" alink="#ff3300" vlink="#000055">
<h1 align = "center">
CORDIC <br> Approximation of Elementary Functions
</h1>
<hr>
<p>
<b>CORDIC</b>
is a C++ library which
uses the CORDIC algorithm to evaluate
certain functions, in particular the sine and cosine.
</p>
<h3 align = "center">
Licensing:
</h3>
<p>
The computer code and data files described and made available on this web page
are distributed under
<a href = "../../txt/gnu_lgpl.txt">the GNU LGPL license.</a>
</p>
<h3 align = "center">
Languages:
</h3>
<p>
<b>CORDIC</b> is available in
<a href = "../../c_src/cordic/cordic.html">a C version</a> and
<a href = "../../cpp_src/cordic/cordic.html">a C++ version</a> and
<a href = "../../f77_src/cordic/cordic.html">a FORTRAN77 version</a> and
<a href = "../../f_src/cordic/cordic.html">a FORTRAN90 version</a> and
<a href = "../../m_src/cordic/cordic.html">a MATLAB version</a>.
</p>
<h3 align = "center">
Related Data and Programs:
</h3>
<p>
<a href = "../../cpp_src/fn/fn.html">
FN</a>,
a C++ library which
contains routines by Wayne Fullerton for evaluating elementary
and special functions.
</p>
<p>
<a href = "../../cpp_src/polpak/polpak.html">
POLPAK</a>,
a C++ library which
evaluates recursively defined polynomials and other special functions.
</p>
<p>
<a href = "../../f_src/specfun/specfun.html">
SPECFUN</a>,
a FORTRAN90 library which
evaluates certain special functions using fitted data.
</p>
<p>
<a href = "../../cpp_src/test_values/test_values.html">
TEST_VALUES</a>,
a C++ library which
returns some tabulated values of various functions.
</p>
<h3 align = "center">
Reference:
</h3>
<p>
<ol>
<li>
Pitts Jarvis,<br>
Implementing CORDIC Algorithms,<br>
Dr. Dobb's Journal,<br>
October 1990.
</li>
<li>
Jean-Michel Muller,<br>
Elementary Functions: Algorithms and Implementation,<br>
Second Edition,<br>
Birkhaeuser, 2006,<br>
ISBN13: 978-0-8176-4372-0,<br>
LC: QA331.M866.
</li>
<li>
Allan Sultan,<br>
CORDIC: How Hand Calculators Calculate,<br>
The College Mathematics Journal,<br>
Volume 40, Number 2, March 2009, pages 87-92.
</li>
<li>
Jack Volder,<br>
The CORDIC Computing Technique,<br>
IRE Transactions on Electronic Computers,<br>
Volume 8, Number 3, pages 330-334, 1959.
</li>
<li>
Jack Volder,<br>
The Birth of CORDIC,<br>
Journal of VLSI Signal Processing Systems,<br>
Volume 25, Number 2, pages 101-105, June 2000.
</li>
<li>
Anthony Williams,<br>
Optimizing Math-Intensive Applications with Fixed-Point Arithmetic,<br>
Dr Dobb's Journal,<br>
Volume 33, Number 4, April 2008, pages 38-43.
</li>
</ol>
</p>
<h3 align = "center">
Source Code:
</h3>
<p>
<ul>
<li>
<a href = "cordic.cpp">cordic.cpp</a>, the source code;
</li>
<li>
<a href = "cordic.hpp">cordic.hpp</a>, the include file;
</li>
<li>
<a href = "cordic.sh">cordic.sh</a>,
commands to compile the source code;
</li>
</ul>
</p>
<h3 align = "center">
Examples and Tests:
</h3>
<p>
<ul>
<li>
<a href = "cordic_prb.cpp">cordic_prb.cpp</a>, the calling program;
</li>
<li>
<a href = "cordic_prb.sh">cordic_prb.sh</a>, commands to
compile, link and run the calling program;
</li>
<li>
<a href = "cordic_prb_output.txt">cordic_prb_output.txt</a>, the sample output.
</li>
</ul>
</p>
<h3 align = "center">
List of Routines:
</h3>
<p>
<ul>
<li>
<b>ANGLE_SHIFT</b> shifts angle ALPHA to lie between BETA and BETA+2PI.
</li>
<li>
<b>ARCCOS_CORDIC</b> returns the arccosine of an angle using the CORDIC method.
</li>
<li>
<b>ARCCOS_VALUES</b> returns some values of the arc cosine function.
</li>
<li>
<b>ARCSIN_CORDIC</b> returns the arcsine of an angle using the CORDIC method.
</li>
<li>
<b>ARCSIN_VALUES</b> returns some values of the arc sine function.
</li>
<li>
<b>ARCTAN_CORDIC</b> returns the arctangent of an angle using the CORDIC method.
</li>
<li>
<b>ARCTAN_VALUES</b> returns some values of the arc tangent function.
</li>
<li>
<b>CBRT_CORDIC</b> returns the cube root of a value using the CORDIC method.
</li>
<li>
<b>CBRT_VALUES</b> returns some values of the cube root function.
</li>
<li>
<b>COS_VALUES</b> returns some values of the cosine function.
</li>
<li>
<b>COSSIN_CORDIC</b> returns the sine and cosine of an angle by the CORDIC method.
</li>
<li>
<b>EXP_CORDIC</b> evaluates the exponential function using the CORDIC method.
</li>
<li>
<b>EXP_VALUES</b> returns some values of the exponential function.
</li>
<li>
<b>I4_HUGE</b> returns a "huge" I4.
</li>
<li>
<b>I4_MIN</b> returns the minimum of two I4's.
</li>
<li>
<b>LN_CORDIC</b> evaluates the natural logarithm using the CORDIC method.
</li>
<li>
<b>LN_VALUES</b> returns some values of the natural logarithm function.
</li>
<li>
<b>R8_UNIFORM_01</b> returns a unit pseudorandom R8.
</li>
<li>
<b>SIN_VALUES</b> returns some values of the sine function.
</li>
<li>
<b>SQRT_CORDIC</b> returns the square root of a value using the CORDIC method.
</li>
<li>
<b>SQRT_VALUES</b> returns some values of the square root function.
</li>
<li>
<b>TAN_CORDIC</b> returns the tangent of an angle using the CORDIC method.
</li>
<li>
<b>TAN_VALUES</b> returns some values of the tangent function.
</li>
<li>
<b>TIMESTAMP</b> prints the current YMDHMS date as a time stamp.
</li>
</ul>
</p>
<p>
You can go up one level to <a href = "../cpp_src.html">
the C++ source codes</a>.
</p>
<hr>
<i>
Last modified on 23 June 2007.
</i>
<!-- John Burkardt -->
</body>
</html>