-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
version 2.2.1 as can be downloaded elsewhere
- Loading branch information
0 parents
commit e8bc219
Showing
648 changed files
with
32,828 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
version 2.2.1 -- 11/8/01 | ||
|
||
Alter the QR rotation routines supporting singular value | ||
decomposition qrbdv.c, qrbdu1.c, and qrbdi.c to avoid a | ||
rare numerical instability. | ||
|
||
Modify the installation script makelibs.sh to ensure that | ||
the new QR rotation code is not compiled with optimization. | ||
The QR fix does not survive the GNU compiler's optimization. | ||
|
||
Alter include in sany.c to read: #include "../ccmath.h". | ||
|
||
|
||
version 2.2.0 -- 12/13/00 | ||
|
||
Convert all function definitions to the modern ASCII style. | ||
|
||
Revise test programs to support automatic checking of their | ||
output against the sample output appended as a comment to | ||
the test code source. Modifications were made to most of | ||
the test code to support this. | ||
|
||
Supply shell code to permit the automatic checks of standard | ||
test outputs. | ||
|
||
Corect the manual entry for the values returned by the | ||
solv function (revision in C-01). | ||
|
||
|
||
version 2.1.2 -- 10/05/00 | ||
|
||
Modify installation scripts makelibs.sh and install.sh | ||
to eliminate an undefined linker option. | ||
|
||
Correct structure initializations in ccmath.h. (missing | ||
braces) | ||
|
||
Use <stdlib.h> to define all references to allocation | ||
functions calloc() and malloc(). This header is now | ||
included by ccmath.h. | ||
|
||
Correct failures to free allocated storage in some eigenvalue | ||
routines. | ||
|
||
Change declarations of unsigned long to unsigned int | ||
to correct problems on the DEC Alpha where unsigned long | ||
has a length of 64 bits. | ||
|
||
Revise ccmath.h and manual to reflect the altered | ||
declarations of unsigned quantities. (Revisions in | ||
C-07, C-10, and C-14.) | ||
|
||
Fixed a bug in the singular value distribution code | ||
that could lead to an attempt to operate with NANs. | ||
|
||
|
||
version 2.1.1 -- 5/19/00 | ||
|
||
Revise hash storage programs to allow use of multiple | ||
hash schemes in a program. ( Programs that use the | ||
functions hashins, hashdel, hfind, and hval must be | ||
revised to use this new form.) | ||
|
||
Revised manual chapter C10-sort to reflect hash function | ||
changes. | ||
|
||
Minor correction in manual chapter C01-matrix. | ||
|
||
Clean up anachronistic K&R type declarations of calloc | ||
and malloc. (stdlib.h is now used) | ||
|
||
Alter index incrementation code in time series functions | ||
that resulted in warnings from DEC ALPHA compiler. | ||
|
||
|
||
version 2.1.0 -- 5/1/00 | ||
|
||
Add section containing benchmark test code and output. | ||
('benchmk' directory ) | ||
|
||
Specify use of '/bin/sh' in installation scripts | ||
|
||
Change license policy to LPGL the GNU library public license. | ||
|
||
|
||
|
||
version 2.0.1 -- 2/27/00 | ||
|
||
Correct spelling error in script 'install.sh'. | ||
|
||
3/19/00 | ||
Correct function name in '~/simu/supp/lranb.c' : "lrana() -> lranb()". |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
|
||
INSTALL CCMATH | ||
|
||
The CCMATH Mathematics Library is installed using three shell scripts | ||
located in the distribution directory containing this INSTALL file: | ||
|
||
makelibs.sh , non_intel.sh , and install.sh | ||
|
||
These scripts should be run from the distribution directory. | ||
|
||
NOTE: The installation scripts assume a shell that accepts Borne shell | ||
syntax commands, such as 'bash' or 'ksh'. I They current specify | ||
use of '/bin.sh'. You may alter this another compatible shell | ||
by altering the first line in the script files. | ||
|
||
1) SKIP THIS STEP IF YOUR TARGET IS INTEL COMPATIBLE!! | ||
If you are installing the library on a platform that does | ||
not use an Intel 80x86 compatible processor, run the script | ||
non_intel.sh first. The script will query you on the byte | ||
order employed by the target processor (little-endian for | ||
INTEL and big-endian for many UNIX workstations). You | ||
should know the answer before running non_intel.sh. | ||
[ To test the byte order of your processor, compile | ||
and run the program byteord.c , and compare the | ||
output with sample output for a little-endian | ||
processor appended as a comment to the byteord | ||
source. If they differ, your processor is | ||
big-endian. ] | ||
|
||
2) Run the makelibs.sh script to compile the source code. | ||
The script will query you on whether or not the target | ||
processor is Intel compatible. If it is, respond by | ||
entering 'y'. The script will compile both a static | ||
library 'ccm.a' and a shared library 'lccm.so', | ||
stored in the subdirectory 'tmp'. | ||
|
||
Optimization flags and/or the compiler command used | ||
can be altered by editing the script. This distribution | ||
was tested using gcc version 2.7.2.3. | ||
|
||
3) Run the install.sh script as the ROOT user to install the | ||
header file and the libraries. The default locations are: | ||
|
||
header: /usr/include/ccmath.h | ||
static lib: /usr/lib/libccm.a | ||
shared lib: /lib/libccm.so | ||
|
||
These locations can be altered by editing the script. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
CCMATH: A Mathematics Library | ||
----------------------------- | ||
Version 2.2.0 | ||
|
||
developed and maintained by | ||
Daniel A. Atkinson | ||
<[email protected]> | ||
|
||
This package contains the source and test code for the CCMATH | ||
mathematics library. The library is a collection of functions, coded in | ||
the C-language, that perform computations frequently encountered in | ||
scientific, mathematical, and statistical applications. Library functions | ||
are designed to exploit the efficiency and portability of C in such | ||
applications. The following areas are covered: | ||
|
||
o Linear Algebra | ||
o Numerical Integration | ||
o Geometry and Trigonometry | ||
o Curve Fitting | ||
o Roots and Optimization | ||
o Fourier Analysis | ||
o Simulation Support | ||
o Statistical Functions | ||
o Special Functions | ||
o Sorts and Searches | ||
o Time Series Modeling | ||
o Complex Arithmetic | ||
o High Precision Arithmetic | ||
|
||
The library code may be freely redistributed under the terms of the | ||
GNU library public license (LGPL). The distribution directory contains a | ||
copy of this license. Note that CCMATH is provides AS IS, with NO WARRANTY, | ||
either expressed or implied. | ||
|
||
Version 2.2.0 incorporates some major upgrades of the library designed | ||
to facilitate its usability. First all function definitions have been | ||
upgraded to the modern ASCII standard. This was already used in the | ||
function declarations of the header file 'ccmath.h'. It enables compile | ||
time checking of the types of function arguments. The test functions | ||
have also been upgraded to support automatic comparison with sample | ||
outputs. This a simple test of each function does not require tedious | ||
comparison of printed numerical values. This is explained further in the | ||
TESTING file in the current directory. | ||
|
||
The 'manual' subdirectory contains documentation for each of the | ||
functions in the library. The introductory Chapter 'C00-intro' is | ||
recommended reading for all users. Each function is covered by a detailed | ||
function synopsis. Chapters of the manual are indexed with the name of | ||
the subdirectory containing the source code covered in the chapter. | ||
|
||
Compilation and installation are covered in the INSTALL file in the | ||
current directory. This should be fairly simple, but you will need to know | ||
the answers to: | ||
|
||
1) Is the target processor Intel compatible? | ||
2) If not, is the byte order big-endian or not? | ||
|
||
Each source code directory has a 'test' subdirectory with library | ||
test code. This test code serves dual roles, since it permits tests of | ||
library functions and it provides an example of how the function is used. | ||
I strongly recommend inspection of the test code for functions you intend | ||
to use. The modules tested by a test function are identified in the test | ||
function's header, and a sample of test output is given in a trailing | ||
comment. | ||
|
||
The 'benchmk' directory contains drivers for timing the execution | ||
of many library functions. The file 'linux_p2.tim' in this directory | ||
presents results that you can compare with times obtained on your | ||
hardware. | ||
|
||
Problems encountered with CCMATH, comments on your use of the | ||
package, or timing data you would like to share can be sent to me at | ||
<[email protected]>. To properly address problems I will need the following | ||
information: | ||
|
||
a. The compiler used to compile the package, and the target | ||
processor. | ||
b. Compiler options used if they differ from the defaults in | ||
'mklibs.sh'. | ||
c. Output from runs of test code for the suspect functions, if it | ||
differs from the sample output in this distribution. | ||
d. If possible, source code for the program where the problem was | ||
discovered. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
TESTING CCMATH | ||
|
||
Two script files, runtest (a shell script), and testex (a perl script) | ||
are supplied to facilitate comparison of test program output with the | ||
sample output appended as a comment to each test source file. These | ||
scripts should be placed in some directory on your executable path. You | ||
should also check the first line of each script to and modify it if | ||
the locations assumed /bin/sh and /usr/bin/perl are not correct. | ||
|
||
To run a test and check its output you simply execute runtest in | ||
the 'test' subdirectory containing the test source code. | ||
|
||
runtest testsource.c test-command-line-parameters | ||
|
||
The standard command line parameters for each test are tabulated in the | ||
README file of the test subdirectory. This tabulation also specifies | ||
the sequence of prompt responses (if any) required to generate the | ||
standard test output. The output of the run is then compared, using | ||
'diff' to the standard output appended as a comment to the test source. | ||
Output of a successful test will look like the sample below. | ||
|
||
1,2d0 | ||
< /* Test output | ||
< | ||
36d33 | ||
< */ | ||
|
||
It includes only the enclosing comment flags and possibly some blank lines. | ||
Any differences in numerical values that appear may indicate a failed test. | ||
|
||
Note that some compilers generate slightly different formats for | ||
scientific (%e) notation, so differences in such numbers, flagged by 'diff', | ||
should be inspected to see if they actually differ in value as well as | ||
format. | ||
|
||
This test capability simplifies and speeds up initial testing of | ||
library functions. I urge you to inspect the test code and run some | ||
alternative tests for any function that will play a critical role in | ||
your application. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
Benchmark Timing | ||
|
||
This directory contains the source code for drivers that time the | ||
execution of important CCMATH functions. The header comments in each of | ||
the source files describes the input command line parameters required | ||
by the function. The file 'linux_2p.tim' contains timing data I obtained | ||
on a 233 MHz Pentium II. | ||
|
||
The quoted times were obtained, after instalation of the ccmath | ||
library, with programs compiled using | ||
|
||
cc -O3 "bench".c -lccm -lm , | ||
|
||
where "bench " is one of the following drivers. | ||
|
||
|
||
timbes.c ----- time the execution of Bessel functions | ||
timeigv.c ---- time the computation of the eigenvalues | ||
and eigenvectors of a real symmetric matrix | ||
timeval.c ---- time the computation of the eigenvalues of | ||
a real symmetric matrix | ||
timfft2.c ---- time a radix-2 Fast Fourier Transform (FFT) | ||
timfftgc.c --- time a general radix complex FFT | ||
timheval.c --- time the computation of the eigenvalues of a | ||
hermitian matrix | ||
timhevec.c --- time the computation of the eigenvalues and | ||
eigenvectors of a hermitian matrix | ||
timhsrt.c ---- time the heap sort of a real array | ||
timintg.c ---- time a numerical integration of complete | ||
elliptic integrals | ||
timlpac.c ---- time the solution of a real linear system (LINPAC) | ||
timmiv.c ----- time the inversion of a real matrix | ||
timmsrt.c ---- time the merge sort of a real array | ||
timmul.c ----- time the multiplication of real matrices | ||
timnrml.c ---- time the generation of pseudorandom normals | ||
timqsrt.c ---- time the 'quicksort' of a real array | ||
timslpac.c --- time the solution of 'small' linear systems | ||
(dimension < 400) | ||
timssrt.c ---- time the "Shell' sort of a real array | ||
|
||
The following functions generate the binary matrix data files used | ||
as input to the eigensystem timing routines. | ||
|
||
hmatgen.c ---- generate a hermitian matrix with the specified | ||
dimension | ||
smatgen.c ---- generate a real symmetric matrix with the specified | ||
dimension | ||
|
||
The eigenvalues employed in these generators have a simple equal | ||
spacing. This portion of the generator code can easily be changed | ||
to generate matrices with more complex patterns of eigenvalues. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* hmatgen.c CCMATH mathematics library source code. | ||
* | ||
* Copyright (C) 2000 Daniel A. Atkinson All rights reserved. | ||
* This code may be redistributed under the terms of the GNU library | ||
* public license (LGPL). ( See the lgpl.license file for details.) | ||
* ------------------------------------------------------------------------ | ||
*/ | ||
/* | ||
Create a Hermitian matrix with specified eigenvalues. | ||
Input parameters: size -> n for an n by n matrix | ||
o_file -> name of output file | ||
*/ | ||
#include <time.h> | ||
#include "ccmath.h" | ||
void main(int na,char **av) | ||
{ Cpx *h,*u; FILE *fp; | ||
int i,n,m; double *e,s; | ||
unsigned int seed; | ||
if(na!=3){ printf("para: size o_file\n"); exit(1);} | ||
n=atoi(*++av); m=n*n; | ||
fp=fopen(*++av,"wb"); | ||
fwrite((void *)&n,sizeof(int),1,fp); | ||
h=(Cpx *)calloc(2*m,sizeof(Cpx)); u=h+m; | ||
e=(double *)calloc(n,sizeof(double)); | ||
for(i=0,s=1.; i<n ;++i,s+=.5) e[i]=s; | ||
seed=(unsigned int)time(NULL); setunfl(seed); | ||
unitary(u,n); | ||
hmgen(h,e,u,n); | ||
fwrite((void *)h,sizeof(Cpx),m,fp); | ||
} |
Oops, something went wrong.