C4LIB
A Single Precision Complex Arithmetic Utility Library
C4LIB
is a C++ library which
defines some elementary operations for "C4" or
"single precision complex" arithmetic.
Licensing:
The computer code and data files described and made available on this web page
are distributed under
the GNU LGPL license.
Languages:
C4LIB is available in
a C version and
a C++ version and
a FORTRAN77 version and
a FORTRAN90 version.
Related Programs:
C8LIB,
a C++ library which
implements certain elementary functions for "C8" or
double precision complex variables;
COMPLEX_NUMBERS,
a C++ program which
demonstrates some simple features involved in the use of
complex numbers in C programming.
I4LIB,
a C++ library which
contains many utility routines, using "I4" or "single precision integer"
arithmetic.
I8LIB,
a C++ library which
contains many utility routines, using "I8" or "double precision integer"
arithmetic.
R4LIB,
a C++ library which
contains many utility routines, using "R4" or
"single precision real" arithmetic.
R8LIB,
a C++ library which
contains many utility routines, using "R8" or
"double precision real" arithmetic.
SUBPAK,
a C++ library which
contains many utility routines;
Source Code:
Examples and Tests:
List of Routines:
-
C4_ABS returns the absolute value of a C4.
-
C4_ARGUMENT returns the argument of a C4.
-
C4_CUBE_ROOT returns the principal cube root of a C4.
-
C4_I returns the value of the imaginary unit, i as a C4.
-
C4_LE_L1 := X <= Y for C4 values, and the L1 norm.
-
C4_LE_L2 := X <= Y for C4 values, and the L2 norm.
-
C4_LE_LI := X <= Y for C4 values, and the L-oo norm.
-
C4_MAGNITUDE returns the magnitude of a C4.
-
C4_NORM_L1 evaluates the L1 norm of a C4.
-
C4_NORM_L2 evaluates the L2 norm of a C4.
-
C4_NORM_LI evaluates the L-oo norm of a C4.
-
C4_NORMAL_01 returns a unit pseudonormal C4.
-
C4_ONE returns the value of complex 1.
-
C4_PRINT prints a C4.
-
C4_SQRT returns the principal square root of a C4.
-
C4_SWAP swaps two C4's.
-
C4_UNIFORM_01 returns a unit pseudorandom C4.
-
C4_ZERO returns the value of 0 as a C4.
-
C4MAT_COPY copies one C4MAT to another.
-
C4MAT_COPY_NEW copies one C4MAT to a "new" C4MAT.
-
C4MAT_IDENTITY sets a C4MAT to the identity.
-
C4MAT_INDICATOR_NEW returns the C4MAT indicator matrix.
-
C4MAT_NINT rounds the entries of a C4MAT.
-
C4MAT_PRINT prints a C4MAT.
-
C4MAT_PRINT_SOME prints some of a C4MAT.
-
C4MAT_UNIFORM_01 returns a unit pseudorandom C4MAT.
-
C4MAT_UNIFORM_01_NEW returns a new unit pseudorandom C4MAT.
-
C4VEC_COPY copies a C4VEC.
-
C4VEC_COPY_NEW copies a C4VEC to a "new" C4VEC.
-
C4VEC_INDICATOR_NEW sets a C4VEC to the indicator vector.
-
C4VEC_NORM_L2 returns the L2 norm of a C4VEC.
-
C4VEC_PRINT prints a C4VEC.
-
C4VEC_PRINT_PART prints "part" of a C4VEC.
-
C4VEC_PRINT_SOME prints some of a C4VEC.
-
C4VEC_UNIFORM_01 returns a unit pseudorandom C4VEC.
-
C4VEC_UNIFORM_01_NEW returns a unit pseudorandom C4VEC.
-
C4VEC_UNITY returns the N roots of unity in a C4VEC.
-
I4_MAX returns the maximum of two I4's.
-
I4_MIN returns the minimum of two I4's.
-
R4_ABS returns the absolute value of an R4.
-
R4_MAX returns the maximum of two R4's.
-
R4_NINT returns the nearest integer to an R4.
-
R4_UNIFORM_01 returns a unit pseudorandom R4.
-
SORT_HEAP_EXTERNAL externally sorts a list of items into ascending order.
-
TIMESTAMP prints the current YMDHMS date as a time stamp.
You can go up one level to
the C++ source codes.
Last revised on 19 June 2010.