SciMath Advanced Scientific C/C++ Math Library
Table of Contents of SciMath Users Manual
Chapter 1 Introduction 
Chapter 2 Approximation 
Chapter 3 Differential Equations 
Chapter 4 Eigensystems 
Chapter 5 Transforms 
Chapter 6 Linear Algebra 
Chapter 7 Optimization 
Chapter 8 Partial Diffrential Equations 
Chapter 9 Integration 
Chapter 10 Random Numbers 
Chapter 11 Roots 
Chapter 12 Special Functions 
Chapter 13 Statistics 
Chapter 14 Utility Functions 
Index 
TABLE OF CONTENTS
Title 
Page 
CHAPTER 1 
12 
12 

Installation 
12 
General information on using SciMath Functions 
12 
Single and Double Precision Functions 
13 
Error Handling 
13 
Function description page 
13 
Multidimensional Arrays 
14 
CHAPTER 2 
22 
22 

Introduction 
22 
cifrnl Differentiate a cubic spline 
25 
cinpol Interpolate using cubic spline 
26 
cleval Evaluate a cubic spline 
27 
csplit Cubic spline fit 
28 
msmshd Computes locally uniform mesh, made of discrete points 
29 
mspudp Piecewise uniform mesh for a set of discrete points 
210 
sbeval Derivative basis spline computation 
211 
sderiv Selected derivative, basis spline computation 
212 
sdeval Compute spline and derivative 
213 
sinteg Basis spline integration 
214 
smeval Compute spline 
215 
sntgdp Compute spline and selected derivatives 
216 
snzspl Basis spline computation 
217 
spdfit Apply a Bspline fit to derivatives of a function 
218 
spdisc Create Bspline mesh for fitting discrete data points 
219 
spffit Apply a Bspline fit to a function 
220 
spldpt Generate uniform mesh of discrete points 
222 
splhdi Uniform variation diminishing 3dimensional spline 
223 
splodi Uniform variation diminishing 1dimensional spline 
225 
spltdi Uniform variation diminishing 2dimensional spline 
226 
splums Generate uniform mesh for a Bspline 
228 
spumsh Computes locally uniform mesh for a B spline 
229 
spwnms Piecewise uniform mesh for a Bspline 
230 
srrabs Compute absolute error in B spline fit to a function 
231 
srrasc Compute absolute error on B spline in selected intervals 
232 
srrest Computing estimate error in B spline fit using mesh refinement 
233 
srrsca Computing estimate error in B spline in selected intervals 
234 
ssqfit Least Squares Bspline fit, discrete data 
235 
ssqwfi Weighted Least Squares Bspline fit, discrete data 
236 
svaltn Compute spline and selected derivatives with more user control 
237 
uncini Best uniform approximation with initial approximation 
239 
uuncap Approximation of a mesh, best uniform approximation 
241 


CHAPTER 3 
32 
32 

Introduction 
32 
odeivp Stiff ODE (Ordinary differential equation) initial value problem 
33 
odnivp Initial Value Problem, Ordinary Differential Equation Solver 
35 
odvmod Initial Value Problem, ODE Solver (Second Version) 
37 


CHAPTER 4 
42 
42 

Introduction 
42 
eigbal Create a balanced matrix with equal eigenvalues 
43 
eighes Create a balanced matrix with equal eigenvalues 
44 
eighmt Compute eigenvalues of a Hessenberg matrix 
45 
eighos Reduction of a real symmetric matrix, Housholder method 
46 
eigsmt Compute eigenvectors and eigenvalues of a symmetric matrix 
47 
eigsur Sort eigenvalues 
48 
eigtri Eigenvalues and eigenvectors of a symmetric tridiagonal matrix 
49 
mtgenc Complex general eigenvalue problem solver 
410 
mtigen Eigenvectors and eigenvalues of a general real matrix 
411 


CHAPTER 5 
52 
52 

Introduction 
52 
fftcmu Initialization for fftltp 
53 
fftcpx Inverse Fast Fourier Transform, complex data 
54 
fftdat Fast Fourier Transform, real data 
55 
fftinv Inverse Fast Fourier Transform, Real Data 
56 
fftitm Initialization for fftult 
57 
fftltp Complex data multiple Fourier transform 
58 
fftmpx Fast Fourier Transform, general case 
59 
fftmul Real data multiple Fast Fourier Transform 
510 
fftplx Fast Fourier Transform, complex data 
511 
fftult HalfComplex data multiple Fast Fourier Transform 
512 


CHAPTER 6 
63 
63 

Introduction 
63 
aramua Multiply array by k and add to another array 
68 
arasum Add elements of an array 
69 
arcamu Complex version of arsuma 
610 
armmax Largest element of an array 
611 
arplrt Plane rotate a vector 
612 
arrcop Copy an array to the other 
613 
arrdot Dot product of two arrays 
614 
arrexc Exchange two arrays 
615 
arrgiv Givens plane rotation 
616 
arscal Scale an array 
617 
arsuma Sum of absolute values if an array 
618 
cagsum Computes magnitude of real part plus magnitude of imaginary part 
619 
ccscal Scale a complex array 
620 
cecmul Scale a complex array ( second variation 
621 
cecsum Copy a complex array to another 
622 
ceswch Exchange two complex arrays 
623 
corvec Largest element of a complex array 
624 
cotvec Plane rotation to a complex vector 
625 
cplrot Givens rotation for a complex vector 
626 
ctprct Dot product of two complex arrays 
627 
ctprod Dot product of two complex arrays, conjugate input 
628 
ctsqls Complex linear equations, Least Squares solution 
629 
culsum Multiply complex array by complex number z and add to another array 
630 
lesqso Least squares solution of linear equations 
631 
linqrs QR decomposition 
633 
linqso Linear system solver using QR decomposition 
634 
lnchbk Linear system solver using Cholesky backsubstitution 
635 
lnchol Cholesky decomposition 
636 
mlunum LU numerical decomposition of sparse matrix with input function 
637 
msucon LU decomposition of a sparse matrix with condition estimation and input function 
638 
mtarsm Multiplication of symmetric matrix and vector 
640 
mtbano Norm of a banded unsymmetric matrix 
641 
mtbdec Banded unsymmetric matrix decomposition 
642 
mtbdes Symmetric band positive definite matrix LDL decomposition 
643 
mtcmul Multiply matrix and vector 
644 
mtcomp Symmetric band positive definite matrix LDL decomposition 
645 
mtcond Linear system solution (banded), with condition estimation 
646 
mtecon Performs LU decomposition of general matrix with condition estimation 
647 
mtforw Sparse linear system forwardback solution 
648 
mtgcon Solution of general linear system with condition estimation 
649 
mtgenm Performs LU decomposition of a general matrix 
650 
mtlcem Sparse matrix LU decomposition with condition estimation, input matrix 
651 
mtlins Sparse linear system solution with input function 
652 
mtlnsy Symmetric linear system solver with condition estimation 
653 
mtlond Condition estimation of LDL decomposition 
654 
mtlsbl Lower triangular band, linear system solution 
655 
mtlsbs Linear system solver (banded) 
656 
mtlslm Solution of lower triangular linear system 
657 
mtlssp Definite band positive linear system solution with condition estimation 
658 
mtlude Banded unsymmetric matrix and condition estimation, LU decomposition 
659 
mtmfor Lower triangular linear system solution (band symmetric matrix 
660 
mtmlss Linear system solution for band positive definite system 
661 
mtmult Matrixvector multiplication for banded positive definite matrix 
662 
mtnges Solution of general linear system 
663 
mtnlum Performs LU decomposition of a general matrix 
664 
mtnnor General matrix norm 
665 
mtorde Row/Column ordering of a sparse matrix with input function 
666 
mtposn Band positive definite matrix norm 
667 
mtqsol Least squares solution 
668 
mtrlss Solution of lower triangular linear system 
669 
mtsbup Upper triangular band linear system solution 
670 
mtslnf Sparse linear system solver (forwardback solution 
671 
mtslns Sparse linear system solver, forwardsolution (modified 
672 
mtslsq Least squares solution and Singular Value Decomposition 
673 
mtslus Sparse matrix symbolic LU decomposition with input function 
675 
mtsmdm Symmetric matrix MDM^{T} decomposition 
676 
mtsmul Vectorsparse matrix multiplication, function input 
677 
mtspam Vector multiplication of sparse matrix, input matrix 
678 
mtspld Sparse matrix LU decomposition with input matrix 
679 
mtsyce Symmetric matrix decomposition with condition estimation 
681 
mtsydc Symmetric matrix decomposition 
682 
mtsyfb Symmetric matrix with forwardback solution 
683 
mtsyln Symmetric linear system solver 
684 
mtsynr Symmetric matrix norm 
685 
mtudec Banded unsymmetric matrix, LU decomposition 
686 
mtudeu LU decomposition of a sparse matrix with input function 
687 
mtvmul Matrix vector multiplication (banded) 
689 
mtymbp Definite upper triangular linear system solution, positive band 
690 
vadmax Element index of the largest magnitude element of a vector 
691 
vadmin Element index of the smallest magnitude element of a vector 
692 
vaemax Element index of the maximum element of a vector 
693 
vaemin Element index of the minimum element of a vector 
694 
vaxmax Element index of the largest magnitude element of a complex vector 
695 
vaxmin Element index of the smallest magnitude element of a complex vector 
696 
veucln Compute Euclidean norm of a vector 
697 
vinmax Element index of the maximum element of a integer vector 
698 
vinmin Element index of the minimum element of a integer vector 
699 


CHAPTER 7 
72 
72 

Introduction 
72 
fminim Finds local minima 
74 
menghb Simple bounds minimization with gradient and Hessian 
75 
menlqb Simple bounds nonlinear least squares 
77 
menmin Minimization of a function 
79 
mennlj Nonlinear least squares with Jacobian 
710 
mensbg Simple bounds minimization of a function with gradient 
712 
mensbm Simple bounds minimization of a function 
714 
mgengh Simple bounds minimization of a function with gradient and Hessian 
715 
mgengm Minimization of a function with gradient 
717 
mgenjb Simple bounds nonlinear least squares with Jacobian 
719 
mgenlq Nonlinear least squares 
721 
mgennm Unconstrained optimization, NelderMead algorithm 
722 
mgnldb Simple bounds separable nonlinear least squares with derivatives 
723 
mgnlqb Simple bounds separable nonlinear least squares 
725 
mignld Separable nonlinear least squares with derivatives 
727 
mignlq No constraint separable nonlinear least squares 
729 
mtineq Linear programming 
731 
opquaf Compute local minimum using quadratic programming 
732 
vsblty General linear equality and inequality constraints 
733 


CHAPTER 8 
82 
82 

Introduction 
82 
pdeovx Solution of elliptic PDE, overrelaxation method 
83 
pdemlg Solution of elliptic PDE, multigrid method 
85 
pdenlm Solution of nonlinear elliptic PDE, multigrid method 
87 


CHAPTER 9 
92 
92 

Introduction 
92 
qahere Weights and Abscissas of GaussHermite quadrature with the weight of 
93 
qasxaw Weights and Abscissas of Gauss quadrature with the weight of xa 
94 
qaulqe Weights and Abscissas of GaussLaguerre quadrature with the weight of e^{x} 
95 
qauslq Weights and Abscissas of GaussLegendre quadrature 
96 
qdegps Piecewise smooth function integrator 
97 
qdntgr Integration using ralative error 
98 
qdtegi Integration of a set of integrals 
99 
qdtgbc Main integration function with boundary conditions 
910 
qgausq Weights and Abscissas of Gauss quadrature 
911 
qsexaw Weights and Abscissas of Gauss quadrature with weighting of xa e^{x} 
912 
qubspl Quadrature using Cubic Spline 
914 
quslog Weights and Abscissas of Gauss quadrature with weighting of log(1/x) 
915 
sntegr Integration using Bsplines 
916 


CHAPTER 10 
102 
102 

Introduction 
102 
binran Binomial distribution random deviate generator 
103 
gamdis Gamma distributed random deviate generator 
104 
posran Poisson distributed random deviate generator 
105 
raarit Random deviate and bit pattern generator 
106 
rainit Initial seed generator 
107 
ranbit Randon bit generator 
108 
ranexp Exponentially distributed random deviate generator 
109 
ranksm Uniform random number generator, Knith method 
1010 
ranlec Uniform random number generator with long period sequence and shuffle 
1011 
ranpmr Minimal standard random number generator 
1012 
ranpsh Minimal standard random number generator with shuffle 
1013 
rarvar Generate Gaussian deviate 
1014 
rnddvt Generate uniform random deviate 
1015 


CHAPTER 11 
112 
112 

Introduction 
112 
czerop Zeros of complex polynomials 
113 
rsreal Real single root within an interval 
114 
rterop Compute complex zeros of polynomials 
115 
rtller Real/Complex root of a function 
116 
rzernl Solves nonlinear systems 
117 
rzrnlj Solves nonlinear systems using Jacobian 
118 


CHAPTER 12 
122 
122 

Introduction 
122 
acoshh Hyperbolic cosine 123 

arccos Arc cosine 
124 
arcsin Arc sine 
125 
arsinh Hyperbolic arc sine 
126 
artanh Hyperbolic arc tangent 
127 
beinrt I, modified real argument Bessel functions of integer order 
128 
beintc I, modified Bessel functions of complex integer order and argument 
129 
beintr J, real argument Bessel fuctions of integer order 
1210 
bejntc J, complex argument Bessel functions of integer order 
1211 
catlog Complex natural logarithm 
1212 
coshhh Hyperbolic cosine 
1213 
cpontl Complex exponential: e^{(r+jm)} 
1214 
gammaa Gammaa function (real) 
1215 
sinhhh Hyperbolic sine 
1216 
tangnt Tangent 
1217 
tanhhh Hyperbolic tangent 1218 



CHAPTER 13 
132 
132 

Introduction 
132 
stchio Performs chisquare test for the case of difference between 
133 
stchit Performs chisquare test for the case of difference between two 
134 
stcken Contingency analysis (Kendall's tau) 
135 
stcore Correlation between two sets of data (Pearson's method) 
136 
stfvar Performs F test for difference of variances 137 

stgssm Generate GolaySavitzky coefficients for smoothing 
138 
stkend Correlation for two sets of data (Kendall's tau) 
139 
stksdd KolmogorovSmirnov test for two sets of data 
1310 
stksmd KolmogorovSmirnov test for data and model 
1311 
stksmf KolmorovSmirnov main probability function 
1312 
stkstd Two dimensional KolmogorovSmirnov test, data and data 
1313 
stmomt Computes moments of data 
1314 
strcor Rank correlation for two sets of data (Spearman's method) 
1315 
ststst Computes difference of means (Student's test) 
1316 
sttaba Chis contingency table analysis 
1317 
sttabt Entropy measure for contingency table analysis 
1318 
sttpxd Performs Student's test for the case of paired data 1319 

sttvar Student's test of means for unequal variances 
1320 
stvars Computes variance and mean of data 
1321 
stcomp Fit to a straight line (x,y composition) 
1322 
stline Fits data to a straight line (least absolute deviation method) 1323 

stlsqr Leastsquares data fit to a straight line 
1324 


CHAPTER 14 
142 
142 

Introduction 
142 
antsym Unsymmetrize an array 
143 
arcpyd Initialize a number of floating point array elements 
144 
arcpyi Initialize a number of integer array elements 
145 
arhopr Rearrange Hollerith data using input permutation 
146 
arrsym Transfom a vector into a symmetric form 
147 
arshdp Hollerith data passive sort 
148 
arshol Hollerith data sort 
149 
artlws Get n'th smallest element in an array 
1410 
contch Converts base 10 number to machine base 
1411 
fltdec Decompose a floating point number 
1412 
flttbt Convert a floating point number to base 10 
1413 
genrep Generate floating point number 
1414 
getpol Orthogonal polynomial evaluation 
1415 
polccs Chebyshev polynomial evaluation 
1416 
poltrs Trigonometric polynomial evaluation 
1417 
vepbrn Move backward a real array 
1418 
vepfin Move forward an integer array 
1419 
vepfrn Move forward an array 
1420 
vetest Test vector: if monotone increasing or decreasing 
1421 
veybin Move backward an integer array 
1422 
vncdec Test if array is strictly monotone increasing/decreasing 
1424 
Index 
Advanced Scientific Applications, Inc. SciMath Division.
215 E. Orangethorpe Ave. Suite: 333
Fullerton, CA 92832
Tel: 7146806600
Fax: 7144508010
Email: sales@scimath.com