forked from johannesgerer/jburkardt-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathc8lib.html
475 lines (445 loc) · 12.8 KB
/
c8lib.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
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
<html>
<head>
<title>
C8LIB - A Double Precision Complex Arithmetic Utility Library
</title>
</head>
<body bgcolor="#EEEEEE" link="#CC0000" alink="#FF3300" vlink="#000055">
<h1 align = "center">
C8LIB <br> A Double Precision Complex Arithmetic Utility Library
</h1>
<hr>
<p>
<b>C8LIB</b>
is a C++ library which
is a utility library for "C8" or
"double precision complex" arithmetic.
</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>C8LIB</b> is available in
<a href = "../../c_src/c8lib/c8lib.html">a C version</a> and
<a href = "../../cpp_src/c8lib/c8lib.html">a C++ version</a> and
<a href = "../../f77_src/c8lib/c8lib.html">a FORTRAN77 version</a> and
<a href = "../../f_src/c8lib/c8lib.html">a FORTRAN90 version</a> and
<a href = "../../m_src/c8lib/c8lib.html">a MATLAB version</a> and
<a href = "../../m_src/c8lib/c8lib.html">a Python version</a>..
</p>
<h3 align = "center">
Related Programs:
</h3>
<p>
<a href = "../../cpp_src/c4lib/c4lib.html">
C4LIB</a>,
a C++ library which
implements certain elementary functions for "C4" or
single precision complex variables;
</p>
<p>
<a href = "../../cpp_src/c8_complex_lib/c8_complex_lib.html">
C8_COMPLEX_LIB</a>,
a C++ library which
defines a class called "c8_complex" for complex numbers with
double precision components.
</p>
<p>
<a href = "../../cpp_src/complex_numbers/complex_numbers.html">
COMPLEX_NUMBERS</a>,
a C++ program which
demonstrates some simple features involved in the use of
complex numbers in C programming.
</p>
<p>
<a href = "../../cpp_src/i4lib/i4lib.html">
I4LIB</a>,
a C++ library which
contains many utility routines, using "I4" or "single precision integer"
arithmetic.
</p>
<p>
<a href = "../../cpp_src/i8lib/i8lib.html">
I8LIB</a>,
a C++ library which
contains many utility routines, using "I8" or "double precision integer"
arithmetic.
</p>
<p>
<a href = "../../cpp_src/r4lib/r4lib.html">
R4LIB</a>,
a C++ library which
contains many utility routines, using "R4" or
"single precision real" arithmetic.
</p>
<p>
<a href = "../../cpp_src/r8lib/r8lib.html">
R8LIB</a>,
a C++ library which
contains many utility routines, using "R8" or
"double precision real" arithmetic.
</p>
<p>
<a href = "../../cpp_src/subpak/subpak.html">
SUBPAK</a>,
a C++ library which
contains many utility routines;
</p>
<h3 align = "center">
Source Code:
</h3>
<p>
<ul>
<li>
<a href = "c8lib.cpp">c8lib.cpp</a>, the source code;
</li>
<li>
<a href = "c8lib.hpp">c8lib.hpp</a>, the include file.
</li>
<li>
<a href = "c8lib.sh">c8lib.sh</a>,
commands to compile the source code;
</li>
</ul>
</p>
<h3 align = "center">
Examples and Tests:
</h3>
<p>
<ul>
<li>
<a href = "c8lib_prb.cpp">c8lib_prb.cpp</a>, the calling program;
</li>
<li>
<a href = "c8lib_prb.sh">c8lib_prb.sh</a>,
commands to compile, link and run the calling program;
</li>
<li>
<a href = "c8lib_prb_output.txt">c8lib_prb_output.txt</a>,
the output file.
</li>
</ul>
</p>
<h3 align = "center">
List of Routines:
</h3>
<p>
<ul>
<li>
<b>C8_ABS</b> returns the absolute value of a C8.
</li>
<li>
<b>C8_ACOS</b> evaluates the inverse cosine of a C8.
</li>
<li>
<b>C8_ACOSH</b> evaluates the inverse hyperbolic cosine of a C8.
</li>
<li>
<b>C8_ADD</b> adds two C8's.
</li>
<li>
<b>C8_ARG</b> returns the argument of a C8.
</li>
<li>
<b>C8_ASIN</b> evaluates the inverse sine of a C8.
</li>
<li>
<b>C8_ASINH</b> evaluates the inverse hyperbolic sine of a C8.
</li>
<li>
<b>C8_ATAN</b> evaluates the inverse tangent of a C8.
</li>
<li>
<b>C8_ATANH</b> evaluates the inverse hyperbolic tangent of a C8.
</li>
<li>
<b>C8_CONJ</b> conjugates a C8.
</li>
<li>
<b>C8_COPY</b> copies a C8.
</li>
<li>
<b>C8_COS</b> evaluates the cosine of a C8.
</li>
<li>
<b>C8_COSH</b> evaluates the hyperbolic cosine of a C8.
</li>
<li>
<b>C8_CUBE_ROOT</b> returns the principal cube root of a C8.
</li>
<li>
<b>C8_DIV</b> divides two C8's.
</li>
<li>
<b>C8_DIV_R8</b> divides a C8 by an R8.
</li>
<li>
<b>C8_EXP</b> exponentiates a C8.
</li>
<li>
<b>C8_I</b> returns the value of the imaginary unit, i as a C8.
</li>
<li>
<b>C8_IMAG</b> returns the imaginary part of a C8.
</li>
<li>
<b>C8_INV</b> inverts a C8.
</li>
<li>
<b>C8_LE_L1</b> := X <= Y for C8 values, and the L1 norm.
</li>
<li>
<b>C8_LE_L2</b> := X <= Y for C8 values, and the L2 norm.
</li>
<li>
<b>C8_LE_LI</b> := X <= Y for C8 values, and the L-oo norm.
</li>
<li>
<b>C8_LOG</b> evaluates the logarithm of a C8.
</li>
<li>
<b>C8_MAG</b> returns the magnitude of a C8.
</li>
<li>
<b>C8_MUL</b> multiplies two C8's.
</li>
<li>
<b>C8_NEG</b> negates a C8.
</li>
<li>
<b>C8_NINT</b> returns the nearest complex integer of a C8.
</li>
<li>
<b>C8_NORM_L1</b> evaluates the L1 norm of a C8.
</li>
<li>
<b>C8_NORM_L2</b> evaluates the L2 norm of a C8.
</li>
<li>
<b>C8_NORM_LI</b> evaluates the L-oo norm of a C8.
</li>
<li>
<b>C8_NORMAL_01</b> returns a unit pseudonormal C8.
</li>
<li>
<b>C8_ONE</b> returns the value of complex 1.
</li>
<li>
<b>C8_PRINT</b> prints a C8.
</li>
<li>
<b>C8_REAL</b> returns the real part of a C8.
</li>
<li>
<b>C8_SIN</b> evaluates the sine of a C8.
</li>
<li>
<b>C8_SINH</b> evaluates the hyperbolic sine of a C8.
</li>
<li>
<b>C8_SQRT</b> returns the principal square root of a C8.
</li>
<li>
<b>C8_SUB</b> subtracts two C8's.
</li>
<li>
<b>C8_SWAP</b> swaps two C8's.
</li>
<li>
<b>C8_TAN</b> evaluates the tangent of a C8.
</li>
<li>
<b>C8_TANH</b> evaluates the hyperbolic tangent of a C8.
</li>
<li>
<b>C8_TO_CARTESIAN</b> converts a C8 to Cartesian form.
</li>
<li>
<b>C8_TO_POLAR</b> converts a C8 to polar form.
</li>
<li>
<b>C8_UNIFORM_01</b> returns a unit pseudorandom C8.
</li>
<li>
<b>C8_ZERO</b> returns the value of 0 as a C8.
</li>
<li>
<b>C8MAT_ADD</b> combines two C8MAT's using complex scalar factors.
</li>
<li>
<b>C8MAT_ADD_R8</b> combines two C8MAT's using real scalar factors.
</li>
<li>
<b>C8MAT_COPY</b> copies one C8MAT to another.
</li>
<li>
<b>C8MAT_COPY_NEW</b> copies one C8MAT to a "new" C8MAT.
</li>
<li>
<b>C8MAT_FSS</b> factors and solves a system with multiple right hand sides.
</li>
<li>
<b>C8MAT_FSS_NEW</b> factors and solves a system with multiple right hand sides.
</li>
<li>
<b>C8MAT_IDENTITY_NEW</b> sets a C8MAT to the identity.
</li>
<li>
<b>C8MAT_INDICATOR_NEW</b> returns the C8MAT indicator matrix.
</li>
<li>
<b>C8MAT_MINVM</b> returns inverse(A) * B for C8MAT's.
</li>
<li>
<b>C8MAT_MINVM_NEW</b> returns inverse(A) * B for C8MAT's.
</li>
<li>
<b>C8MAT_MM</b> multiplies two matrices.
</li>
<li>
<b>C8MAT_MM_NEW</b> multiplies two matrices.
</li>
<li>
<b>C8MAT_NINT</b> rounds the entries of a C8MAT.
</li>
<li>
<b>C8MAT_NORM_FRO</b> returns the Frobenius norm of a C8MAT.
</li>
<li>
<b>C8MAT_NORM_L1</b> returns the matrix L1 norm of a C8MAT.
</li>
<li>
<b>C8MAT_NORM_LI</b> returns the matrix L-oo norm of a C8MAT.
</li>
<li>
<b>C8MAT_PRINT</b> prints a C8MAT.
</li>
<li>
<b>C8MAT_PRINT_SOME</b> prints some of a C8MAT.
</li>
<li>
<b>C8MAT_SCALE</b> scales a C8MAT by a complex scalar factor.
</li>
<li>
<b>C8MAT_SCALE_R8</b> scales a C8MAT by a real scalar factor.
</li>
<li>
<b>C8MAT_UNIFORM_01</b> returns a unit pseudorandom C8MAT.
</li>
<li>
<b>C8MAT_UNIFORM_01_NEW</b> returns a unit pseudorandom C8MAT.
</li>
<li>
<b>C8MAT_ZERO_NEW</b> returns a new zeroed C8MAT.
</li>
<li>
<b>C8VEC_COPY</b> copies a C8VEC.
</li>
<li>
<b>C8VEC_COPY_NEW</b> copies a C8VEC to a "new" C8VEC.
</li>
<li>
<b>C8VEC_INDICATOR_NEW</b> sets a C8VEC to the indicator vector.
</li>
<li>
<b>C8VEC_NINT</b> rounds the entries of a C8VEC.
</li>
<li>
<b>C8VEC_NORM_L1</b> returns the L1 norm of a C8VEC.
</li>
<li>
<b>C8VEC_NORM_L2</b> returns the L2 norm of a C8VEC.
</li>
<li>
<b>C8VEC_NORM_LI</b> returns the Loo norm of a C8VEC.
</li>
<li>
<b>C8VEC_PRINT</b> prints a C8VEC.
</li>
<li>
<b>C8VEC_PRINT_PART</b> prints "part" of a C8VEC.
</li>
<li>
<b>C8VEC_PRINT_SOME</b> prints some of a C8VEC.
</li>
<li>
<b>C8VEC_SORT_A_L1</b> ascending sorts a C8VEC by L1 norm.
</li>
<li>
<b>C8VEC_SORT_A_L2</b> ascending sorts a C8VEC by L2 norm.
</li>
<li>
<b>C8VEC_SORT_A_LI</b> ascending sorts a C8VEC by Loo norm.
</li>
<li>
<b>C8VEC_SPIRAL_NEW</b> returns N points on a spiral between C1 and C2.
</li>
<li>
<b>C8VEC_UNIFORM_01_NEW</b> returns a unit pseudorandom C8VEC.
</li>
<li>
<b>C8VEC_UNITY</b> returns the N roots of unity in a C8VEC.
</li>
<li>
<b>CARTESIAN_TO_C8</b> converts a Cartesian form to a C8.
</li>
<li>
<b>POLAR_TO_C8</b> converts a polar form to a C8.
</li>
<li>
<b>R8_ABS</b> returns the absolute value of an R8.
</li>
<li>
<b>R8_ATAN</b> computes the inverse tangent of the ratio Y / X.
</li>
<li>
<b>R8_CSQRT</b> returns the complex square root of an R8.
</li>
<li>
<b>R8_FLOOR</b> rounds an R8 down to the nearest integral R8.
</li>
<li>
<b>R8_MAX</b> returns the maximum of two R8's.
</li>
<li>
<b>R8_SIGN</b> returns the sign of an R8.
</li>
<li>
<b>R8_UNIFORM_01</b> returns a unit pseudorandom R8.
</li>
<li>
<b>R8POLY2_ROOT</b> returns the two roots of a quadratic polynomial.
</li>
<li>
<b>R8POLY3_ROOT</b> returns the three roots of a cubic polynomial.
</li>
<li>
<b>R8POLY4_ROOT</b> returns the four roots of a quartic polynomial.
</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 = "../cpp_src.html">
the C++ source codes</a>.
</p>
<hr>
<i>
Last revised on 09 February 2015.
</i>
<!-- John Burkardt -->
</body>
</html>