Node:Install, Next:Usage, Previous:Top, Up:Top
While the code is plain ANSI C and thus quite portable, the following adaptions might be neccessary for compile this library.
All configurations are done in the file src/prng.h
. Each option is
extensively commented there. Here is a quick rundown on what to
expect there:
prng_num
. It is not
recommended to change this. For 32 and 64 bit computers all
neccessary auxiliary definitions will be made automatically.
For other architectures, please edit prng.h
according to the comments.
prng_inverse
. In previous versions, there was no
algorithm which was fastest on all architectures, thus is was
necessary configure the library for the each platform.
Now prng_inverse_own
, which combines the speedups of all
old algorithms is the fastest one on all tested architectures
and thus no configuration is necessary any more.
The code is optimized for GNU CC (gcc). If your compiler supports the type
(long long int
), too, you can use this feature by defining
HAVE_LONGLONG
in prng.h
.
Then do:
./configure --prefix=<prefix_path> make
This should compile the library (libprng.a
) and example programs.
To install the library (see also GNU generic installation instructions
in file
INSTALL
)
type:
make install
which installs <prefix_path>/lib/libprng.a
,
<prefix_path>/include/prng.h
, and
<prefix_path>/info/prng.info
.
If --prefix
is omitted, then /usr/local
is used as
default.
It is possible to remove these files by
make uninstall
I could not test this code in many environments, thus it might be necessary to tweak the code to compile it. Please mail me any changes you made, so that I can include them in the next official release.
A manual can be found in directory doc
in various formats, including
PS, PDF, HTML, Info and plain text.
Do
make check
to make and run the following executables:
iter
euclid_table
algorithm. It's NOT kept up to date.
Use at own risk.
validate