BOOTSTRAP (klibm) library
LIBRARY NAME
klibm - Library of functions that comprise Math Services
DESCRIPTION
The klibm library provides the functions that make up math services.
These functions are machine independent implementations of common
mathematical operations and a variety of useful extensions to the standard
mathematical functions provided in libm. Eventually, klibm
will encompass all of the functionality of the standard math library; in
addition, it will contain many functions not provided by libm.
You are encouraged to make use of functions provided in math services
rather than using their standard libm counterparts, as the math services
variations are designed to be highly portable and efficient.
Math services augments the standard math utilities by offering functions for
manipulating single and double precision complex data, generating random
numbers and sequences with a variety of distributions, doing operations
on matrices, generation of periodic sequences, performing interpolation,
converting data types, and performing both scaling and normalization.
In addition, math services provides C implementations of some
FORTRAN 77 math functions that are not typically included in libm.
LIST OF LIBRARY FUNCTIONS
- kdcsqrt
- calculate the double precision complex square root of a double precision complex number.
- kdcexp
- double complex exponential function
- kdclog
- double complex natural logarithm
- kdcpow
- compute the double complex value of a double complex number raised to a double complex power.
- kdccos
- double complex cosine
- kdcsin
- double complex sine
- kdctan
- double complex tangent
- kdccosh
- double complex hyperbolic cosine
- kdcsinh
- double complex hyperbolic sine
- kdctanh
- double complex hyperbolic tangent
- kcsqrt
- calculate the complex square root of a complex argument.
- kcexp
- complex exponential function
- kclog
- complex natural logarithm
- kcpow
- compute the value of a complex number raised to a complex power
- kdcadd
- add two double precision complex numbers.
- kdcsub
- subtract one double precision complex number from another.
- kdcmult
- multiply two double precision complex numbers.
- kdcang
- compute the radian angle of a double precision complex number.
- kdcdiv
- divide one double precision complex number by another.
- kdcmagsq
- calculate the squared magnitude of a double precision complex number.
- kdcmag
- compute the magnitude of a double precision complex number.
- kdclogmagp1
- compute the log magnitude of a double precision complex number plus one.
- kdclogmag
- compute the log magnitude of a double precision complex number.
- kdclogmagsq
- compute the log magnitude squared of a double precision complex number.
- kdclogmagsqp1
- compute the log magnitude squared of a double precision complex number plus one.
- kdcconj
- compute the conjugate of a double precision complex number.
- kcadd
- add two complex numbers.
- kcsub
- subtract one kcomplex number from another.
- kcmult
- multiply two complex numbers.
- kcang
- compute the radian angle of a complex number.
- kcdiv
- divide one complex number by another.
- kcmagsq
- calculate the squared magnitude of a kcomplex number.
- kcmag
- compute the magnitude of a complex number.
- kclogmagp1
- compute the log magnitude of a complex number plus one.
- kclogmag
- compute the log magnitude of a complex number.
- kclogmagsq
- compute the log magnitude squared of a complex number.
- kclogmagsqp1
- compute the log magnitude squared of a complex number plus one.
- kcconj
- compute the conjugate of a complex number.
- kdcomplex_to_arrays
- separate array of double complex into real and imaginary arrays
- kdccomp
- construct a double precision complex number from two real numbers.
- kdcreal
- return the real component of a double precision complex number.
- kdcimag
- return the imaginary component of a double precision complex number.
- kdcr2p
- convert double complex from rectangular coordinates to polar coordinates
- kdcp2r
- convert double complex from polar coordinates to rectangular coordinates
- kccomp
- construct a complex number from two real numbers.
- kcreal
- return the real component of a complex number.
- kcimag
- return the imaginary component of a complex number.
- kcr2p
- convert complex from rectangular coordinates to polar coordinates
- kcp2r
- convert complex from polar coordinates to rectangular coordinates
- kcomp2dcomp
- convert a kcomplex number to a kdcomplex number.
- kdcomp2comp
- convert a kdcomplex number to a kcomplex number.
- kblas_dscal
- scale a double vector
- kblas_daxpy
- add two double vectors while scaling one
- kblas_dswap
- swap two double vectors
- klin_dgefa
- factors a double matrix by gaussian elimination.
- klin_dgedi
- computes the determinate and inverse of a matrix
- kdmatrix_inner_prod
- compute the inner product of two vectors.
- kdmatrix_vector_prod
- compute the matrix-vector product.
- kdmatrix_princ_axis
- obtain the principle axis of a covariance matrix.
- kdmatrix_multiply
- multiply two matrices
- kdmatrix_clear
- zeros a matrix
- kdmatrix_identity
- set matrix to identity
- kdmatrix_inverse
- inverts a matrix.
- kpowtwo
- determine if number is an integer power of two.
- kfact
- compute factorial of input.
- kimpulse
- evaluate impulse function.
- kstep
- evaluate step function.
- ksign
- evaluate sign function.
- ksinc
- sinc function which is "sin(x)/x"
- krecip
- reciprocal function.
- kneg
- negative function
- kfraction
- returns the fractional part of x
- kset
- return a value with all bit set
- kclear
- return an value with all bits clear
- knot
- bitwise not (invert) function
- klogical_not
- logical not (invert) function
- klogn
- base log n of argument
- kblas_sscal
- scale a float vector
- kblas_saxpy
- add two float vectors while scaling one
- kblas_sswap
- swap two float vectors
- klin_sgefa
- factors a float matrix by gaussian elimination.
- klin_sgedi
- computes the determinate and inverse of a matrix
- kfmatrix_inner_prod
- compute the inner product of two vectors.
- kfmatrix_vector_prod
- compute the matrix-vector product.
- kfmatrix_princ_axis
- obtain the principle axis of a covariance matrix.
- kfmatrix_multiply
- multiply two matrices
- kfmatrix_clear
- zeros a matrix
- kfmatrix_identity
- set matrix to identity
- kfmatrix_inverse
- inverts a matrix.
- kdata_arith2_ubyte
- perform 2-input unsigned byte arithmetic
- kdata_arith2_ulong
- perform 2-input unsigned long arithmetic
- kdata_arith2_long
- perform 2-input long arithmetic
- kdata_arith2_double
- perform 2-input double precision arithmetic
- kdata_arith2_dcomplex
- perform 2-input double complex arithmetic
- kdata_fill
- fill memory with value by data type
- kdata_minmax
- find the min/max values for a region of data
- kdata_size
- return the size of a khoros data type
- kdatatype_cast_process
- cast type for processing
- kdatatype_to_define
- takes the string version of the data type and returns the #define value.
- kdefine_to_datatype
- takes the #define data type value and returns the string value
- kdatatype_cast_output
- recommend an appropriate common data type for processing
- kacos
- compute the arc cosine of the argument.
- kasin
- compute the arc sine of the argument.
- katan2
- compute the arc tangent of y/x.
- katan
- compute the arc tangent of the argument.
- ksinh
- compute the hyperbolic sine of the argument.
- kcosh
- compute the hyperbolic cosine of the argument.
- ktanh
- compute the hyperbolic tangent of the argument.
- ksin
- compute the double precision sine of the argument.
- kcos
- compute the double precision cosine of the argument.
- ktan
- compute the double precision tangent of the argument.
- kceil
- compute the ceiling of the argument.
- kfloor
- compute the floor of the argument.
- kexp
- compute the exponential of the argument.
- klog
- compute the natural logarithm of the argument.
- klog10
- compute the base 10 logarithm of the argument.
- kpow
- compute x to the y power.
- ksqrt
- compute the square root of the argument.
- kfabs
- compute the absolute value of the argument.
- kfmod
- compute the floating point modulo of the arguments.
- kfrexp
- compute significand and exponent of argument
- kldexp
- computes x * 2**n
- kmodf
- compute the fractional component of the argument.
- khypot
- compute the euclidean distance from the origin of the arguments.
- ktrunc
- truncate a number
- kgamma
- compute the gamma function of the argument.
- kcbrt
- compute the cube root of the argument.
- kj0
- compute the Bessel function j0 of the argument.
- kj1
- compute the Bessel function j1 of the argument.
- kjn
- compute the general Bessel function jn of the argument.
- ky0
- compute the Bessel function y0 of the argument.
- ky1
- compute the Bessel function y1 of the argument.
- kyn
- compute the general Bessel function yn of the argument.
- kerf
- compute the error function of the argument.
- kerfc
- compute the complement error function of the argument.
- kasinh
- compute the arc hyperbolic sine of the argument.
- kacosh
- compute the arc hyperbolic cosine of the argument.
- katanh
- compute the arc hyperbolic tangent of the argument.
- kexpm1
- compute the exponential function minus 1 of the argument.
- kexp2
- compute the base 2 exponential function of the argument.
- kexp10
- compute the base 10 exponential function of the argument.
- klog1p
- compute the logarithm of x+1 of the argument.
- klog2
- compute the base 2 logarithm of the argument.
- krandom
- generate random number in range [0,2**31-1]
- ksrandom
- seed the krandom random number generator.
- kurng
- generate a uniform random number in the range [0:1].
- kgen_gauss
- generate a vector of gaussian random numbers.
- kgen_expon
- generate a vector of exponential random numbers.
- kgen_unif
- generate a vector of uniform random numbers.
- kgen_rayleigh
- generate a vector of Rayleigh random numbers.
- kgen_poisson
- generate a vector of Poisson random numbers.
- kgen_sine
- generates a sinusoid data set
- kgen_linear
- generate a piecewise linear data set.
- kgen_sinec
- generate a sinc data set.
- kmax
- return the greater of two values.
- kmin
- return the lessor of two values.
- krange
- return a ranged value
- kintercept
- interpolate the intercept
ADDITIONAL INFORMATION
LOCATION OF SOURCE FILES
$BOOTSTRAP/objects/library/klibm/src
LOCATION OF PUBLIC INCLUDE FILE
$BOOTSTRAP/include/klibm/klibm.h
YOU MUST INCLUDE
#include <bootstrap.h>
SEE ALSO
SEE MANUAL
The klibm library is documented in Chapter 3 of the Programming Services
Manuals, Volume I.
COPYRIGHT
Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.