forked from johannesgerer/jburkardt-f
-
Notifications
You must be signed in to change notification settings - Fork 2
/
c4lib.html
400 lines (366 loc) · 10.5 KB
/
c4lib.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
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
<html>
<head>
<title>
C4LIB - A Single Precision Complex Arithmetic Utility Library
</title>
</head>
<body bgcolor="#EEEEEE" link="#CC0000" alink="#FF3300" vlink="#000055">
<h1 align = "center">
C4LIB <br> A Single Precision Complex Arithmetic Utility Library
</h1>
<hr>
<p>
<b>C4LIB</b>
is a FORTRAN90 library which
implements certain
elementary functions for "C4" or single precision complex variables.
</p>
<p>
The symbol "C4" is used to suggest a single precision complex
variable. Here the 4 indicates that the underlying pair of
real numbers each use 4 bytes of storage.
</p>
<p>
C4LIB contains routines that operate on scalars, vectors or
doubly dimensioned arrays of C4's. A vector of C4's is denoted
a C4VEC, and a doubly dimensioned array is a C4MAT.
</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>C4LIB</b> is available in
<a href = "../../c_src/c4lib/c4lib.html">a C version</a> and
<a href = "../../cpp_src/c4lib/c4lib.html">a C++ version</a> and
<a href = "../../f77_src/c4lib/c4lib.html">a FORTRAN77 version</a> and
<a href = "../../f_src/c4lib/c4lib.html">a FORTRAN90 version</a>.
</p>
<h3 align = "center">
Related Data and Programs:
</h3>
<p>
<a href = "../../f_src/blas1_c/blas1_c.html">
BLAS1_C</a>,
a FORTRAN90 library which
contains basic linear algebra routines for vector-vector operations,
using single precision complex arithmetic.
</p>
<p>
<a href = "../../f_src/c8lib/c8lib.html">
C8LIB</a>,
a FORTRAN90 library which
implements certain elementary functions for "C8" or
double precision complex variables.
</p>
<p>
<a href = "../../f_src/complex_numbers/complex_numbers.html">
COMPLEX_NUMBERS</a>,
a FORTRAN90 program which
demonstrates some simple features involved in the use of
complex numbers in FORTRAN90 programming.
</p>
<p>
<a href = "../../f_src/i4lib/i4lib.html">
I4LIB</a>,
a FORTRAN90 library which
contains many utility routines, using "I4" or "single precision integer"
arithmetic.
</p>
<p>
<a href = "../../f_src/i8lib/i8lib.html">
I8LIB</a>,
a FORTRAN90 library which
contains many utility routines, using "I8" or "double precision integer"
arithmetic.
</p>
<p>
<a href = "../../f_src/linpack_c/linpack_c.html">
LINPACK_C</a>,
a FORTRAN90 library which
solves linear systems using single precision complex arithmetic;
</p>
<p>
<a href = "../../f_src/r16lib/r16lib.html">
R16LIB</a>,
a FORTRAN90 library which
contains many utility routines, using "R16" or
"quadruple precision real" arithmetic.
</p>
<p>
<a href = "../../f_src/r4lib/r4lib.html">
R4LIB</a>,
a FORTRAN90 library which
contains many utility routines, using "R4" or
"single precision real" arithmetic.
</p>
<p>
<a href = "../../f_src/r8lib/r8lib.html">
R8LIB</a>,
a FORTRAN90 library which
contains many utility routines, using "R8" or
"double precision real" arithmetic.
</p>
<h3 align = "center">
Source Code:
</h3>
<p>
<ul>
<li>
<a href = "c4lib.f90">c4lib.f90</a>, the source code.
</li>
<li>
<a href = "c4lib.sh">c4lib.sh</a>,
commands to compile the source code.
</li>
</ul>
</p>
<h3 align = "center">
Examples and Tests:
</h3>
<p>
<ul>
<li>
<a href = "c4lib_prb.f90">c4lib_prb.f90</a>,
a sample calling program.
</li>
<li>
<a href = "c4lib_prb.sh">c4lib_prb.sh</a>,
commands to compile and run the sample program.
</li>
<li>
<a href = "c4lib_prb_output.txt">c4lib_prb_output.txt</a>,
the output file.
</li>
</ul>
</p>
<h3 align = "center">
List of Routines:
</h3>
<p>
<ul>
<li>
<b>C4_ABS</b> evaluates the absolute value of a C4.
</li>
<li>
<b>C4_ACOS</b> evaluates the inverse cosine of a C4.
</li>
<li>
<b>C4_ACOSH</b> evaluates the inverse hyperbolic cosine of a C4.
</li>
<li>
<b>C4_ADD</b> adds two C4's.
</li>
<li>
<b>C4_ARG</b> returns the argument of a C4.
</li>
<li>
<b>C4_ASIN</b> evaluates the inverse sine of a C4.
</li>
<li>
<b>C4_ASINH</b> evaluates the inverse hyperbolic sine of a C4.
</li>
<li>
<b>C4_ATAN</b> evaluates the inverse tangent of a C4.
</li>
<li>
<b>C4_ATANH</b> evaluates the inverse hyperbolic tangent of a C4.
</li>
<li>
<b>C4_CONJ</b> evaluates the conjugate of a C4.
</li>
<li>
<b>C4_COPY</b> copies a C4.
</li>
<li>
<b>C4_COS</b> evaluates the cosine of a C4.
</li>
<li>
<b>C4_COSH</b> evaluates the hyperbolic cosine of a C4.
</li>
<li>
<b>C4_CUBE_ROOT</b> returns the principal cube root of a C4.
</li>
<li>
<b>C4_DIV</b> divides two C4's.
</li>
<li>
<b>C4_DIV_R8</b> divides a C4 by an R8.
</li>
<li>
<b>C4_EXP</b> evaluates the exponential of a C4.
</li>
<li>
<b>C4_I</b> returns the imaginary unit, i as a C4.
</li>
<li>
<b>C4_IMAG</b> evaluates the imaginary part of a C4.
</li>
<li>
<b>C4_INV</b> evaluates the inverse of a C4.
</li>
<li>
<b>C4_LE_L1</b> := X <= Y for C4 values, and the L1 norm.
</li>
<li>
<b>C4_LE_L2</b> := X <= Y for C4 values, and the L2 norm.
</li>
<li>
<b>C4_LE_LI</b> := X <= Y for C4 values, and the L Infinity norm.
</li>
<li>
<b>C4_LOG</b> evaluates the logarithm of a C4.
</li>
<li>
<b>C4_MAG</b> returns the magnitude of a C4.
</li>
<li>
<b>C4_MUL</b> multiplies two C4's.
</li>
<li>
<b>C4_NEG</b> returns the negative of a C4.
</li>
<li>
<b>C4_NORM_L1</b> evaluates the L1 norm of a C4.
</li>
<li>
<b>C4_NORM_L2</b> evaluates the L2 norm of a C4.
</li>
<li>
<b>C4_NORM_LI</b> evaluates the L-infinity norm of a C4.
</li>
<li>
<b>C4_NORMAL_01</b> returns a unit pseudonormal C4.
</li>
<li>
<b>C4_ONE</b> returns the value of 1 as a C4.
</li>
<li>
<b>C4_PRINT</b> prints a C4.
</li>
<li>
<b>C4_REAL</b> evaluates the real part of a C4.
</li>
<li>
<b>C4_SIN</b> evaluates the sine of a C4.
</li>
<li>
<b>C4_SINH</b> evaluates the hyperbolic sine of a C4.
</li>
<li>
<b>C4_SQRT</b> returns the principal square root of a C4.
</li>
<li>
<b>C4_SUB</b> subtracts two C4's.
</li>
<li>
<b>C4_SWAP</b> swaps two C4's.
</li>
<li>
<b>C4_TAN</b> evaluates the tangent of a C4.
</li>
<li>
<b>C4_TANH</b> evaluates the hyperbolic tangent of a C4.
</li>
<li>
<b>C4_TO_CARTESIAN</b> converts a C4 to Cartesian form.
</li>
<li>
<b>C4_TO_POLAR</b> converts a C4 to polar form.
</li>
<li>
<b>C4_UNIFORM_01</b> returns a unit pseudorandom C4.
</li>
<li>
<b>C4_ZERO</b> returns the value of 0 as a C4.
</li>
<li>
<b>C4MAT_IDENTITY</b> sets a C4MAT to the identity.
</li>
<li>
<b>C4MAT_INDICATOR</b> returns the C4MAT indicator matrix.
</li>
<li>
<b>C4MAT_NINT</b> rounds the entries of a C4MAT.
</li>
<li>
<b>C4MAT_PRINT</b> prints a C4MAT.
</li>
<li>
<b>C4MAT_PRINT_OLD</b> prints a C4MAT, with an optional title.
</li>
<li>
<b>C4MAT_PRINT_SOME</b> prints some of a C4MAT.
</li>
<li>
<b>C4MAT_UNIFORM_01</b> returns a unit pseudorandom C4MAT.
</li>
<li>
<b>C4VEC_INDICATOR</b> sets a C4VEC to the indicator vector.
</li>
<li>
<b>C4VEC_NINT</b> rounds the entries of a C4VEC.
</li>
<li>
<b>C4VEC_NORM_L2</b> returns the L2 norm of a C4VEC.
</li>
<li>
<b>C4VEC_PRINT</b> prints a C4VEC, with an optional title.
</li>
<li>
<b>C4VEC_PRINT_SOME</b> prints some of a C4VEC.
</li>
<li>
<b>C4VEC_SORT_A_L1</b> ascending sorts a C4VEC by L1 norm.
</li>
<li>
<b>C4VEC_SORT_A_L2</b> ascending sorts a C4VEC by L2 norm.
</li>
<li>
<b>C4VEC_SORT_A_LI</b> ascending sorts a C4VEC by L-infinity norm.
</li>
<li>
<b>C4VEC_SPIRAL</b> returns N points on a spiral between C1 and C2.
</li>
<li>
<b>C4VEC_UNIFORM_01</b> returns a unit pseudorandom C4VEC.
</li>
<li>
<b>C4VEC_UNITY</b> returns the N roots of unity.
</li>
<li>
<b>CARTESIAN_TO_C4</b> converts a Cartesian form to a C4.
</li>
<li>
<b>POLAR_TO_C4</b> converts a polar form to a C4.
</li>
<li>
<b>R8_UNIFORM_01</b> returns a unit pseudorandom R8.
</li>
<li>
<b>SORT_HEAP_EXTERNAL</b> externally sorts a list of items into ascending order.
</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 = "../f_src.html">
the FORTRAN90 source codes</a>.
</p>
<hr>
<i>
Last revised on 13 December 2008.
</i>
<!-- John Burkardt -->
</body>
<!-- Initial HTML skeleton created by HTMLINDEX. -->
</html>