-
Notifications
You must be signed in to change notification settings - Fork 57
/
c8lib.html
661 lines (635 loc) · 18.9 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
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
<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 MATLAB library which
implements certain
elementary functions for "C8" or
double precision complex variables.
</p>
<p>
The symbol "C8" is used to suggest a double precision complex
variable. Here the 8 indicates that the underlying pair of
real numbers each use 8 bytes of storage.
</p>
<p>
C8LIB contains routines that operate on scalars, vectors or
doubly dimensioned arrays of C8's. A vector of C8's is denoted
a C8VEC, and a doubly dimensioned array is a C8MAT.
</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 = "../../m_src/c4lib/c4lib.html">
C4LIB</a>,
a MATLAB library which
implements certain elementary functions for
single precision complex (C4) variables.
</p>
<p>
<a href = "../../m_src/i4lib/i4lib.html">
I4LIB</a>,
a MATLAB library which
contains many utility routines, using "I4" or "single precision integer"
arithmetic.
</p>
<p>
<a href = "../../m_src/r8lib/r8lib.html">
R8LIB</a>,
a MATLAB library which
contains many utility routines, using "R8" or
"double precision real" arithmetic.
</p>
<p>
<a href = "../../m_src/subpak/subpak.html">
SUBPAK</a>,
a MATLAB library which
contains many utility routines;
</p>
<h3 align = "center">
Source Code:
</h3>
<p>
<ul>
<li>
<a href = "c8_abs.m">c8_abs.m</a>,
returns the absolute value of a C8;
</li>
<li>
<a href = "c8_abs_test.m">c8_abs_test.m</a>
</li>
<li>
<a href = "c8_acos.m">c8_acos.m</a>,
returns the inverse cosine of a C8;
</li>
<li>
<a href = "c8_acos_test.m">c8_acos_test.m</a>
</li>
<li>
<a href = "c8_acosh.m">c8_acosh.m</a>,
returns the inverse hyperbolic cosine of a C8;
</li>
<li>
<a href = "c8_acosh_test.m">c8_acosh_test.m</a>
</li>
<li>
<a href = "c8_add.m">c8_add.m</a>,
adds two C8's.
</li>
<li>
<a href = "c8_add_test.m">c8_add_test.m</a>
</li>
<li>
<a href = "c8_arg.m">c8_arg.m</a>,
returns the argument of a C8;
</li>
<li>
<a href = "c8_arg_test.m">c8_arg_test.m</a>
</li>
<li>
<a href = "c8_asin.m">c8_asin.m</a>,
returns the inverse sine of a C8;
</li>
<li>
<a href = "c8_asin_test.m">c8_asin_test.m</a>
</li>
<li>
<a href = "c8_asinh.m">c8_asinh.m</a>,
returns the inverse hyperbolic sine of a C8;
</li>
<li>
<a href = "c8_asinh_test.m">c8_asinh_test.m</a>
</li>
<li>
<a href = "c8_atan.m">c8_atan.m</a>,
returns the inverse tangent of a C8;
</li>
<li>
<a href = "c8_atan_test.m">c8_atan_test.m</a>
</li>
<li>
<a href = "c8_atanh.m">c8_atanh.m</a>,
returns the inverse hyperbolic tangent of a C8;
</li>
<li>
<a href = "c8_atanh_test.m">c8_atanh_test.m</a>
</li>
<li>
<a href = "c8_conj.m">c8_conj.m</a>,
returns the complex conjugate of a C8;
</li>
<li>
<a href = "c8_conj_test.m">c8_conj_test.m</a>
</li>
<li>
<a href = "c8_cos.m">c8_cos.m</a>,
returns the cosine of a C8;
</li>
<li>
<a href = "c8_cos_test.m">c8_cos_test.m</a>
</li>
<li>
<a href = "c8_cosh.m">c8_cosh.m</a>,
returns the hyperbolic cosine of a C8;
</li>
<li>
<a href = "c8_cosh_test.m">c8_cosh_test.m</a>
</li>
<li>
<a href = "c8_cube_root.m">c8_cube_root.m</a>,
returns the cube root of a C8;
</li>
<li>
<a href = "c8_cube_root_test.m">c8_cube_root_test.m</a>
</li>
<li>
<a href = "c8_div.m">c8_div.m</a>,
divides one C8 by another.
</li>
<li>
<a href = "c8_div_test.m">c8_div_test.m</a>
</li>
<li>
<a href = "c8_div_r8.m">c8_div_r8.m</a>,
divides a C8 by an R8.
</li>
<li>
<a href = "c8_div_r8_test.m">c8_div_r8_test.m</a>
</li>
<li>
<a href = "c8_exp.m">c8_exp.m</a>,
computes the exponential of a C8.
</li>
<li>
<a href = "c8_exp_test.m">c8_exp_test.m</a>
</li>
<li>
<a href = "c8_i.m">c8_i.m</a>,
returns the value of the imaginary unit, i as a C8.
</li>
<li>
<a href = "c8_i_test.m">c8_i_test.m</a>
</li>
<li>
<a href = "c8_imag.m">c8_imag.m</a>,
returns the imaginary part of a C8.
</li>
<li>
<a href = "c8_imag_test.m">c8_imag_test.m</a>
</li>
<li>
<a href = "c8_inv.m">c8_inv.m</a>,
returns the inverse of a C8.
</li>
<li>
<a href = "c8_inv_test.m">c8_inv_test.m</a>
</li>
<li>
<a href = "c8_le_l1.m">c8_le_l1.m</a>,
( X <= Y ) for C8's, and the L1 norm.
</li>
<li>
<a href = "c8_le_l1_test.m">c8_le_l1_test.m</a>
</li>
<li>
<a href = "c8_le_l2.m">c8_le_l2.m</a>,
( X <= Y ) for C8's, and the L2 norm.
</li>
<li>
<a href = "c8_le_l2_test.m">c8_le_l2_test.m</a>
</li>
<li>
<a href = "c8_le_li.m">c8_le_li.m</a>,
( X <= Y ) for C8's, and the L-oo norm.
</li>
<li>
<a href = "c8_le_li_test.m">c8_le_li_test.m</a>
</li>
<li>
<a href = "c8_log.m">c8_log.m</a>,
returns the logarithm of a C8;
</li>
<li>
<a href = "c8_log_test.m">c8_log_test.m</a>
</li>
<li>
<a href = "c8_mag.m">c8_mag.m</a>,
returns the magnitude of a C8;
</li>
<li>
<a href = "c8_mag_test.m">c8_mag_test.m</a>
</li>
<li>
<a href = "c8_mul.m">c8_mul.m</a>,
returns the product of two C8's.
</li>
<li>
<a href = "c8_mul_test.m">c8_mul_test.m</a>
</li>
<li>
<a href = "c8_nint.m">c8_nint.m</a>,
rounds a C8 to the nearest complex integer.
</li>
<li>
<a href = "c8_nint_test.m">c8_nint_test.m</a>
</li>
<li>
<a href = "c8_norm_l1.m">c8_norm_l1.m</a>,
computes the L1 norm of a C8.
</li>
<li>
<a href = "c8_norm_l1_test.m">c8_norm_l1_test.m</a>
</li>
<li>
<a href = "c8_norm_l2.m">c8_norm_l2.m</a>,
computes the L2 norm of a C8.
</li>
<li>
<a href = "c8_norm_l2_test.m">c8_norm_l2_test.m</a>
</li>
<li>
<a href = "c8_norm_li.m">c8_norm_li.m</a>,
computes the L-oo norm of a C8.
</li>
<li>
<a href = "c8_norm_li_test.m">c8_norm_li_test.m</a>
</li>
<li>
<a href = "c8_normal_01.m">c8_normal_01.m</a>,
returns a unit pseudonormal C8.
</li>
<li>
<a href = "c8_normal_01_test.m">c8_normal_01_test.m</a>
</li>
<li>
<a href = "c8_one.m">c8_one.m</a>,
returns the value of 1 as a C8.
</li>
<li>
<a href = "c8_one_test.m">c8_one_test.m</a>
</li>
<li>
<a href = "c8_print.m">c8_print.m</a>,
prints a C8.
</li>
<li>
<a href = "c8_print_test.m">c8_print_test.m</a>
</li>
<li>
<a href = "c8_real.m">c8_real.m</a>,
returns the real part of a C8;
</li>
<li>
<a href = "c8_real_test.m">c8_real_test.m</a>
</li>
<li>
<a href = "c8_sin.m">c8_sin.m</a>
returns the sine of a C8.
</li>
<li>
<a href = "c8_sin_test.m">c8_sin_test.m</a>
</li>
<li>
<a href = "c8_sinh.m">c8_sinh.m</a>
returns the hyperbolic sine of a C8.
</li>
<li>
<a href = "c8_sinh_test.m">c8_sinh_test.m</a>
</li>
<li>
<a href = "c8_sqrt.m">c8_sqrt.m</a>,
returns the square root of a C8;
</li>
<li>
<a href = "c8_sqrt_test.m">c8_sqrt_test.m</a>
</li>
<li>
<a href = "c8_sub.m">c8_sub.m</a>,
subtracts one C8 from another.
</li>
<li>
<a href = "c8_sub_test.m">c8_sub_test.m</a>
</li>
<li>
<a href = "c8_tan.m">c8_tan.m</a>,
returns the tangent of a C8.
</li>
<li>
<a href = "c8_tan_test.m">c8_tan_test.m</a>
</li>
<li>
<a href = "c8_tanh.m">c8_tanh.m</a>,
returns the hyperbolic tangent of a C8.
</li>
<li>
<a href = "c8_tanh_test.m">c8_tanh_test.m</a>
</li>
<li>
<a href = "c8_to_cartesian.m">c8_to_cartesian.m</a>,
converts a C8 to Cartesian form.
</li>
<li>
<a href = "c8_to_cartesian_test.m">c8_to_cartesian_test.m</a>
</li>
<li>
<a href = "c8_to_polar.m">c8_to_polar.m</a>,
converts a C8 to polar form.
</li>
<li>
<a href = "c8_to_polar_test.m">c8_to_polar_test.m</a>
</li>
<li>
<a href = "c8_uniform_01.m">c8_uniform_01.m</a>,
returns a unit pseudorandom C8.
</li>
<li>
<a href = "c8_uniform_01_test.m">c8_uniform_01_test.m</a>
</li>
<li>
<a href = "c8_zero.m">c8_zero.m</a>,
returns the value of zero as a C8.
</li>
<li>
<a href = "c8_zero_test.m">c8_zero_test.m</a>
</li>
<li>
<a href = "c8mat_add.m">c8mat_add.m</a>,
combines two C8MAT's with scalar factors.
</li>
<li>
<a href = "c8mat_copy.m">c8mat_copy.m</a>,
copies a C8MAT.
</li>
<li>
<a href = "c8mat_fss.m">c8mat_fss.m</a>,
factors and solves a system with multiple right hand sides.
</li>
<li>
<a href = "c8mat_identity.m">c8mat_identity.m</a>,
returns the C8MAT identity matrix.
</li>
<li>
<a href = "c8mat_identity_test.m">c8mat_identity_test.m</a>
</li>
<li>
<a href = "c8mat_indicator.m">c8mat_indicator.m</a>,
returns the C8MAT indicator matrix.
</li>
<li>
<a href = "c8mat_indicator_test.m">c8mat_indicator_test.m</a>
</li>
<li>
<a href = "c8mat_minvm.m">c8mat_minvm.m</a>,
computes inverse(A) * B for C8MAT's.
</li>
<li>
<a href = "c8mat_nint.m">c8mat_nint.m</a>,
rounds the entries of a C8MAT to the nearest complex integer.
</li>
<li>
<a href = "c8mat_norm_fro.m">c8mat_norm_fro.m</a>,
returns the Frobenius norm of a C8MAT.
</li>
<li>
<a href = "c8mat_norm_fro_test.m">c8mat_norm_fro_test.m</a>
</li>
<li>
<a href = "c8mat_norm_l1.m">c8mat_norm_l1.m</a>,
returns the L1 norm of a C8MAT.
</li>
<li>
<a href = "c8mat_norm_l1_test.m">c8mat_norm_l1_test.m</a>
</li>
<li>
<a href = "c8mat_norm_li.m">c8mat_norm_li.m</a>,
returns the L-infinity norm of a C8MAT.
</li>
<li>
<a href = "c8mat_norm_li_test.m">c8mat_norm_li_test.m</a>
</li>
<li>
<a href = "c8mat_print.m">c8mat_print.m</a>,
prints a C8MAT.
</li>
<li>
<a href = "c8mat_print_some.m">c8mat_print_some.m</a>,
prints some of a C8MAT.
</li>
<li>
<a href = "c8mat_scale.m">c8mat_scale.m</a>,
scales a C8MAT by a scalar factor.
</li>
<li>
<a href = "c8mat_uniform_01.m">c8mat_uniform_01.m</a>,
returns a unit pseudorandom C8MAT.
</li>
<li>
<a href = "c8mat_uniform_01_test.m">c8mat_uniform_01_test.m</a>
</li>
<li>
<a href = "c8mat_zero.m">c8mat_zero.m</a>,
returns the C8MAT zero matrix.
</li>
<li>
<a href = "c8vec_indicator.m">c8vec_indicator.m</a>,
sets a C8VEC to the indicator vector.
</li>
<li>
<a href = "c8vec_indicator_test.m">c8vec_indicator_test.m</a>
</li>
<li>
<a href = "c8vec_nint.m">c8vec_nint.m</a>,
rounds the entries of a C8VEC.
</li>
<li>
<a href = "c8vec_norm_l1.m">c8vec_norm_l1.m</a>,
returns the L1 norm of a C8VEC.
</li>
<li>
<a href = "c8vec_norm_l1_test.m">c8vec_norm_l1_test.m</a>
</li>
<li>
<a href = "c8vec_norm_l2.m">c8vec_norm_l2.m</a>,
returns the L2 norm of a C8VEC.
</li>
<li>
<a href = "c8vec_norm_l2_test.m">c8vec_norm_l2_test.m</a>
</li>
<li>
<a href = "c8vec_norm_li.m">c8vec_norm_li.m</a>,
returns the Loo norm of a C8VEC.
</li>
<li>
<a href = "c8vec_norm_li_test.m">c8vec_norm_li_test.m</a>
</li>
<li>
<a href = "c8vec_print.m">c8vec_print.m</a>,
prints a C8VEC.
</li>
<li>
<a href = "c8vec_print_test.m">c8vec_print_test.m</a>
</li>
<li>
<a href = "c8vec_print_part.m">c8vec_print_part.m</a>,
prints part of a C8VEC.
</li>
<li>
<a href = "c8vec_print_some.m">c8vec_print_some.m</a>,
prints some of a C8VEC.
</li>
<li>
<a href = "c8vec_sort_a_l1.m">c8vec_sort_a_l1.m</a>,
ascending sorts a C8VEC by the L1 norm.
</li>
<li>
<a href = "c8vec_sort_a_l2.m">c8vec_sort_a_l2.m</a>,
ascending sorts a C8VEC by the L2 norm.
</li>
<li>
<a href = "c8vec_sort_a_li.m">c8vec_sort_a_li.m</a>,
ascending sorts a C8VEC by the L-oo norm.
</li>
<li>
<a href = "c8vec_spiral.m">c8vec_spiral.m</a>,
returns N points on a spiral between C1 and C2.
</li>
<li>
<a href = "c8vec_spiral_test.m">c8vec_spiral_test.m</a>
</li>
<li>
<a href = "c8vec_uniform_01.m">c8vec_uniform_01.m</a>,
returns a unit pseudorandom C8VEC.
</li>
<li>
<a href = "c8vec_uniform_01_test.m">c8vec_uniform_01_test.m</a>
</li>
<li>
<a href = "c8vec_unity.m">c8vec_unity.m</a>,
returns the N roots of unity.
</li>
<li>
<a href = "c8vec_unity_test.m">c8vec_unity_test.m</a>
</li>
<li>
<a href = "cartesian_to_c8.m">cartesian_to_c8.m</a>,
converts a Cartesian complex number to C8 format.
</li>
<li>
<a href = "cartesian_to_c8_test.m">cartesian_to_c8_test.m</a>
</li>
<li>
<a href = "polar_to_c8.m">polar_to_c8.m</a>,
converts a polar form complex number to C8 format.
</li>
<li>
<a href = "polar_to_c8_test.m">polar_to_c8_test.m</a>
</li>
<li>
<a href = "r8_atan.m">r8_atan.m</a>,
returns a positive angle with the tangent Y/X.
</li>
<li>
<a href = "r8_atan_test.m">r8_atan_test.m</a>
</li>
<li>
<a href = "r8_sign.m">r8_sign.m</a>,
returns the sign of an R8;
</li>
<li>
<a href = "r8_sign_test.m">r8_sign_test.m</a>,
returns the sign of an R8;
</li>
<li>
<a href = "r8_uniform_01.m">r8_uniform_01.m</a>,
returns a unit pseudorandom R8;
</li>
<li>
<a href = "r8_uniform_01_test.m">r8_uniform_01_test.m</a>
</li>
<li>
<a href = "r8poly2_root.m">r8poly2_root.m</a>,
returns the two roots of a quadratic polynomial.
</li>
<li>
<a href = "r8poly2_root_test.m">r8poly2_root_test.m</a>
</li>
<li>
<a href = "r8poly3_root.m">r8poly3_root.m</a>,
returns the three roots of a cubic polynomial.
</li>
<li>
<a href = "r8poly3_root_test.m">r8poly3_root_test.m</a>
</li>
<li>
<a href = "r8poly4_root.m">r8poly4_root.m</a>,
returns the four roots of a quartic polynomial.
</li>
<li>
<a href = "r8poly4_root_test.m">r8poly4_root_test.m</a>
</li>
<li>
<a href = "sort_heap_external.m">sort_heap_external.m</a>,
external sorts a list of values into ascending order;
</li>
<li>
<a href = "timestamp.m">timestamp.m</a>,
prints the current YMDHMS date as a timestamp;
</li>
</ul>
</p>
<h3 align = "center">
Examples and Tests:
</h3>
<p>
<ul>
<li>
<a href = "c8lib_test.m">c8lib_test.m</a>,
runs all the tests;
</li>
<li>
<a href = "c8lib_test_output.txt">c8lib_test_output.txt</a>,
the output file;
</li>
</ul>
</p>
<p>
You can go up one level to <a href = "../m_src.html">
the MATLAB source codes</a>.
</p>
<hr>
<i>
Last revised on 28 February 2015.
</i>
<!-- John Burkardt -->
</body>
</html>