Skip to content

freemint/pml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The original version of pml (Portable Math Library) was written several 
years ago, when I was just learning C and trying to switch most of my work
for engineering classes from Fortran to C.  I quickly ran into problems
with portability, missing functions, compiler bugs, etc, etc, etc.
Considering I was using some pretty primitive stuff at the time, it's a
wonder anything worked!  Anyway, pml came about from pressures to get 
something that would work in a number of environments and also as a learning
tool as to how floating point libraries worked.  I don't claim to be a
numerical analyst, then or now, but I did learn a lot writing this stuff
(including how to write in C).

Several times I have started to go back and redo the library to use
newer C features, make it compatible with the Unix version, etc.  For
example, the original C compilers I had access to could not pass structures,
just pointers to structures, which made for some pretty ugly code.  Changing
the code to pass a 'complex' structure cleaned it up a lot.  Given
several aborted attempts to redo the whole thing (aborted due to lack
of motivation and/or time), it's now in somewhat of a mess, and probably
inconsistent in several areas.  Still, someone might find it useful, or
even be motivated enough to carry on with it, given this code as a base.

So, in the hopes that someone will 'adopt' pml, and make it their pet,
I've decided to post my most current code, and relinquish all rights to
it.  I.E., make it truly public domain, rather than simply freely
redistributable.

Hints for adoptive parents:

	1.	Much of the documentation and internal comments
		is now either wrong, misleading, or both.  Beware.

	2.	Most C functions use pieces from various iterations
		of my macro based debugging package.  For example,
		the LEAVE() macro hasn't been used directly in years...
		You should either chuck this stuff wholesale, or
		convert it to use my latest version (posted on the
		net some months ago).

	3.	The implementation of functions like 'inverse complex
		hyperbolic arccosine' may very well be numerically
		naive.

	4.	This is your baby now, don't ask me how to change its
		diapers.  I wouldn't mind getting pictures now and then
		though.  :-) :-)

Below is the original README file, for reference.

				Fred Fish
				10-Apr-87

======================================================================

PML --- Portable Math Library for C programs.

This directory contains the PML math library distribution.
Since it is intended to be a highly portable library, useful
on a wide variety of machines, no installation command files
are provided.  It is assumed that the installer is sufficiently
knowledgeable to successfully install the library given the
following general guidelines:

(1)	The constants in "pml.h" must be suitably defined for
	the environment in which the library is to be used.

(2)	The appropriate environment #define variable is 
	defined somewhere, either within the preprocessor
	itself, in <stdio.h>, is added to "pml.h", or
	is included on the compiler invocation command
	line.

	For example, "#define PDP10" or "#define pdp11".

(3)	The file "pmluser.h" is moved to the global header
	file directory, so that an "#include <pmluser.h>"
	will be properly processed.

(4)	All of the library source files are compiled.

(5)	The furnished test routines are compiled, linked
	with the library routines, and executed.

This library currently runs essentially unchanged on a wide
variety of machines, under a wide variety of operating systems.
Known installations include PDP-11s running RSX-11M and using
the DECUS C system, DECSYSTEM-20 running TOPS-20 using an
MIT C compiler, Callan Data Systems 68000 system running
Uniplus (Unix port from Unisoft), and an IBM Personal
Computer running PC-DOS using a CII C compiler.  If you
know of any others, please let me know.

				Fred Fish

Packages

No packages published

Languages