APT HISTORY

Author:  Arthur L. Edwards (email:  xenopsbird@comcast.net).

2007 February 2 17:00.  Added subroutine aptcomg, to find the number of ways
a specified number of items can be separated into a specified number of groups
of specified sizes, without regard to the order of items or groups.
This has applications in cryptography and puzzle solving.

2007 January 12 17:30.  Recompiled all subroutines on YANA, with FORTRAN
compile IFORT.  Added several missing subroutines to Makefile.
Replaced subroutine ranf.c with FORTRAN function ranf.f, which changes the
random number sequence, making reproduction of old test results impossible.

2006 August 4 17:00.  Gave Scott McKinley files geom_doc.tar, geom_make.tar,
geom_test.tar, apt_doc.tar and apt_src.tar on the GPS system, so he can update
the web site .
These files are in ~/work/webscott.

2006 August 4 14:10.  Significant changes since the last update of the web site
http://nuclear.llnl.gov/CNP/apt/:

(1)  Added subroutines to do arithmetic on big integers, including addition,
subtraction, multiplication, division, roots, powers, factorials, modulus,
concatenation, number base conversion, digit reversal, digit counting,
conversion from and to floating point, permutations and combinations, etc.

(3)  Added two new factoring tools (subroutines aptafac and aptpfab).

(4)  Added capability to solve Sudoku and Sudoku-like puzzles (subroutines
aptsudo, aptsudp, aptsudv and aptsudx).

2006 July 6 18:00.  Added subroutine aptbcat to concatenate the digits of
two nonzero big integers.  One use is to create big integers with repeated
groups of digits.

2006 June 13 18:10.  Added subroutine aptbexp to find the exponential function
of an integer and store the result in a big integer.
Changed subroutine aptftob to return the array of big number digits in order
from most to least significant.

2006 June 6 15:40.  Fixed bug in subroutine aptbdiv to correct error when
numerator and denomenator had same number of digits. 

2006 June 6 17:00.  Added subroutine aptbasb to find the value of a big
integer, in any number base, in another specified number base.

2006 June 6 11:40.  Changed subroutine aptdtob to return the array of big
number digits in order from most to least significant.

2006 May 22 16:30.  Added subroutine aptbpac to find the number of permutations
and combinations of M things taken N at a time, when M and N are big integers,
with values up to 450.

2006 April 28 19:00.  Changed all big integer subroutines to make input and
output of big integers in order from most significant to least significant:
aptbadd, aptbsub, aptbfac, aptbmul, aptbdiv, aptbpow, aptbrtn, aptltob.
Changed subroutines aptbadd, aptbsub, aptbmul, aptbdiv to remove
unnecesssary use of aptbrev.

2006 April 5 17:20.  Fixed a bug in subroutine aptbdiv that produced a quotient
of zero when dividing a one-digit integer by an equal or smaller integer.

2006 April 4 16:00.  Added subroutine aptpfab to find factors of a big integer.

2006 March 13 18:00.  Added subroutines aptsudo, aptsudu, and aptsudx,
to solve Sudoku puzzles.

2005 December 20 18:50.  Added subroutine aptblsq, to reduce multiple blanks
to a single blank in a character string.

2005 September 23 16:40.  Added subroutine aptafac, to find unexponentiated
factors of an integer.

2005 September 13 14:45.  Corrected bug in aptperf, causing bad answer for
number of permutations of n things taken m at a time.
Was finding n! / m! instead of n! / (n - m)!.

2005 August 16 16:20.  Added subroutine aptbsum, to find the number of
occurrences of each digit in a big integer.

2005 July 28 17:00.  Added subroutine aptltob, to translate from the log of
a floating point number into an integer in a specified number base, with one
digit per machine word.

2005 June 28 19:20.  Added subroutine aptftob, to translate a floating point
number into an integer in a specified number base, with one digit per machine
word.

2005 June 10 15:50.  Added subroutine aptatob, to copy decimal digits from
an ASCII character string into an integer in a specified number base, with one
digit per machine word.

2005 June 7 10:00.  Added subroutine aptdtob and aptbtod, to translate a decimal
integer into an array of digits representing the digits in a specified number
base, and to do the inverse, from the array of digits back to decimal.
Added subroutine aptbadd, to add two such arrays of digits.
Added subroutine aptbsub, to subtract two such arrays of digits.
Added subroutine aptbmul, to multiply two such arrays of digits.
Added subroutine aptbpow, to find a power of such an array of digits.
Added subroutine aptbdiv, to divide two such arrays of digits.
Added subroutine aptbrtn, to find a root of such an array of digits.
Added subroutine aptbrev, to reverse the order of an integer array.
Added subroutine aptbfac, to find the factorial of such an array of digits.

2005 March 1 19:00.  Added subroutine aptsubi, to convert a stem and a list
of integer subscripts into a single ASCII string.

2005 January 14 16:30.  Gave web site files to Scott McKinley, to put into
.

2005 January 11 18:30.  Corrected more typos in APT subroutines and
documentation.

2004 November 17 18:00.  Added subroutine aptsubb, to convert a stem and a list
of ASCII subscripts into a single ASCII string.

2004 October 4 18:30.  Added suboutine aptbase, to convert a decimal floating
point number to a specified number base.

2004 October 1 13:20.  Added subroutine aptsubm, to separate a character
string representing a variable with one or more subscripts into the stem and the
individual subscripts, and translate the stem and subscripts into integer
and floating point modes, if possible..

2004 July 30 17:15.  Changed subroutine aptbitb, to do Boolean operations
"comp", "not", "and", "nand", "or", "nor", "xor" and "xnor", with synonyms
[and, int], [or, un], [xnor, eqv].

2004 May 11 18:00.  Added subroutine aptquot, to find a character string
delimited by a specified character, with internal occurrences of that
character escaped by pairing them.  Split off from aptfbrk, for clarity.

2004 May 4 19:00.  Added subroutine aptfbrk, to find a character string
within a specified character string, delimited by two specified characters,
with a specified escape character for the delimiters.

2004 March 26 18:00.  Corrected several typos in comment lines in APT
subroutines, and in APT documentation.

2004 March 23 19:10.  Updated APT distribution list, using utility "ph".

2004 March 19 14:00.  Freezing all GEOM and AOT web page files.

2004 February 3 18:00.  Gave tar files from directories apt/doc , apt/test ,
and apt/src to Mike S. "Scott", McKinley, for putting into web site
.
Scott is user quath on the GPS, Email mckinley9@llnl.gov, Ph 925-424-2738.

2004 February 3 12:00.  Removed subroutine descriptions from apt_subs.
My notes are an aptflibe manila folder.
  aptmovp  Move a point a specified distance in a directional field.
  aptnpis  Find family of quadric surfaces, given normals at 3 points.
Removed subroutine descriptions for # from apt_subs.  Obsolete.
  aptchat  Separate a character string into data fields, translate.
  aptchty  Trans a character string into integer and/or floating-point.
  aptffin  Read and crack free-field input lines into symbols, by mode.
The source files are still in apt/src and aptflibe.

2004 January 23 15:00.  Added subroutine aptsubr, to translate a subscripted
charater string into a stem and a subscript.
floating point values of the subscript.

2004 January 23 15:40.  Added subroutine aptsuba to recombine a stem and a
subscript into a subscripted name.

2003 November 21 16:30.  Added subroutines aptdet3 and aptdet4 to find the
determinants of 3x3 and 4x4 matrices.

2003 September 26 15:40.  Added subroutine aptpfft to find the prime factors
and their powers, of a factorial function.

2003 September 12 17:30.  Added subroutine aptcmad to find the greatest
common divisor and least common multiple of a set of integers.

2003 September 5 17:30.  Added subroutine aptmord, to find the order and
multiplicative inverse, if any exists, for any integer modulo any modulus.
This shortens evaluation of any large exponent of the integer when an order
exists.

2003 August 29 18:40.  Added subroutine aptpfac, to find all prime factors of
an integer, without having to save any other prime numbers, and Euler's
totient function for arithmetic modulo the integer.

2003 August 4 16:50.  Added subroutine aptcrtr, to solve the inverse of the
Chinese Remainder Theorem Problem.  Given an integer and a set of divisors,
find the remainders.

2003 July 29 15:20.  Added subroutine aptcrts, to solve the Chinese Remainder
Theorem Problem.

2003 June 20 16:00.  Added subroutine aptprim, to find prime numbers and the
irreducible proportion geometric factors associated with them.

2003 June 10 15:00.  Added subroutine aptdirt, to find all unique directions and
their minimum distances, within one group, or between two groups of points.

2002 October 29 15:10.  Added subroutine aptrmbl, to remove leading and/or
trailing blanks from a character string.

2002 October 23 17:20.  Added subroutine aptsubs, to translate a subscripted
charater string into a stem and a subscript, and find the mode, integer and/or
floating point values of the subscript.

2002 October 7 14:10.  Changed subroutine aptchtp, to not blank out aword
except to right-fill with blanks, and to warn user not to call with
aword = asrce.

2002 June 18 11:00.  Added subroutine aptiris, to find the equivalent of a
decimal number, expressed as an integer plus a series of reciprocals of
integers.

2001 December 3 17:30.  Added subroutines aptcomf, aptfact, aptperf, to find
combinations, factorials, permutations, in integer and real form.

2001 November 13 17:30.  Need subroutine to get factorial.

2001 November 13 14:00.  Added subroutine apthexd, to translate a hexadecimal
string into a decimal number.

2001 November 5 14:00.  Added subroutine apthexa, to translate a decimal number
into a hexadecimal string.

2001 July 17 18:00.  Changed aptcofr and aptcofv to find convergents, partial
sums of continued fractions.

2001 June 25 16:30.  Changed aptcirl, aptsphl to make v3, y3 positive.

2001 June 13 18:30.  Removed more truncation errors in aptsphl.

2001 April 22 16:30.  Changed aptcirk, aptcirl, aptcirk to do special case
r1 + r2 + r3 = 0, and to get more accuracy.

2001 April 30 14:00.  Changed aptripp to initialize ux, uy, uz to -1.e99.

2001 April 23 15:30.  Added subroutien aptripp to find the edge length and
vertices of an equilateral triangle projected from a triangle with specified
vertices.

2001 April 23 15:30.  Added subroutine aptripr to find the edge length and
distances of the vertices of an equilateral triangle projected from a triangle
with specified edge lengths.

2001 March 28 13:30.  Added subroutines aptetru and aptetrv ts find a vector or
a line at specified angles from two other vectors or lines.

2001 March 13 16:40.  Added subroutine aptsver to find Steiner vertex for
a triangle.

2000 October 24 17:00.  Added subroutines aptcofv and aptcofr to find values and
coefficients of continued fractions.

2000 September 11 13:30.  Changed aptnint to avoid an inaccurate result when
a big number is involved.

2000 August 28 18:00.  Added subroutine aptnint to round off to the nearest
integer multiple of a specified quantity, only if the change does not exceed
a specified absolute and/or relative amount.

2000 August 18 17:00.  Changed aptrnds to test for exceeding the largest machine
integer.

2000 August 8 17:30.  Changed aptcang to limit angle in degrees to not exceed
the largest machine integer.

2000 August 2 18:20.  Changed aptcang to round off minutes and seconds to the
nearest integer if within precision tol of the value in degrees..

2000 July 24 17:00.  Added subroutine aptcang to find the value of an angle
specified in one angle unit, in the other angle units:  degrees, grads,
radians, and arc degrees, minutes and seconds.

2000 June 19 17:00.  Added subroutine aptqper to find the quadric surface
on which two specified families of quadric surfaces are orthogonal, and to
find the quadric surface containing the outline of a quadric surface projected
onto a plane, a cylinder, or a sphere.

2000 April 11 17:00.  Changed subroutines aptconl and aptconm to update
fundamental constants from 1986 values to 1998 and 1999 values.
Remade aptconl.o and aptconm.o, libapt.a and aptflibe, and stored in apt/src
on fast storage.

1999 November 3 12:10.  Changed subroutine aptcris to remove duplicate results.

1999 October 4 14:10.  Added subroutine aptrcab to find straight lines that
cut a triangle into two parts with equal areas, equal perimeters, given
the lengths of the edges.  Added subroutine aptrext to find all original big
triangles, give a small triangle resulting from a cut as specified for
subroutines aptrabc, aptrcab and aptrcut.  Added subroutine aptrich to find if
three specified edge lengths can form a real triangle.

1999 August 26 18:40.  Added subroutine aptrabc to find straight lines that
cut a triangle into two parts with equal areas, equal perimeters, given
the lengths of the edges, for two specified edges only.

1999 August 26 16:15.  Changed aptrcut to output fractional distances along
cut edges, and length of the cut line.

1999 August 11 14:20.  Changed aptripq to quit when it does not converge,
instead of when it diverges.

1999 June 22 15:00.  Added subroutine aptrcut to find straight lines that
cut a triangle into two parts with equal areas, equal perimeters, given
the vertex coordinates.

1999 March 29 13:00.  Added debug output to subroutine aptwhis.

1999 March 23 15:00.  Changed subroutine aptaxis to find center of symmetry
only after all coordinate rotations and reflections, to correct bug in
analysis of certain parabolic and hyperbolic cylinders.

1999 March 15 11:50.  Changed truncation calculations in subroutine aptrois
to be more consistent, and to zero out coefficients small relative to other
coefficients.  Changed truncation calculations in subroutine apttris to be
more consistent.

1999 March 15 9:50.  Redocumented subroutine aptqhyp to show that only possible
quadric surfaces are planes and hyperbolic paraboloids, not hyperboloids of
one sheet.

1999 March 9 15:30.  Added debug output to aptaxis.

1999 March 8 14:00.  Added subroutine aptcniz to find a cone on the z axis,
through two specified points.  Like aptcnis, but not over a set of data,
and restricted to the z axis.

1999 March 3 12:40.  Added subroutine aptpfit to find the quadric equation for
a plane through three specified points.
Changed subroutine aptqhyp to fit a plane to a coplanar quadrilateral, or to
a triangle, when two points are coincident.

1999 March 2 15:00.  Changed aptaxis test for mix terms to compare only with
square terms, not linear terms.  Eliminates bug when z + 1.e-20 * xy = 0.

1999 February 23 17:40.  Added subroutine aptqfit, to find any unique quadric
surface through nine points.

1999 February 23 15:00.  Added subroutine aptqhyp, to find a hyperbolic
paraboloid though the vertices, edges and center of a quadrangle.

1999 February 22 17:00.  Changed subroutine aptaxis to allow a principle axis
vector to be very small.  Made unit vector before calling aptrotv.

1999 February 16 16:40.  Added subroutine aptacct, to find the new position,
velocity and acceleration of a particle with a time-dependent acceleration
vector.

1999 February 5 17:20.  Writing aptacct in apt/src, a new subroutine to do
particle acceleration with a time-dependent acceleration.

1999 February 5 14:40.  Modified subroutines aptsphk, aptsphl and aptspht,
for better accuracy in some special cases.

1999 February 2 17:00.  Added subroutine aptsphk, to find the radii and center
coordinates of two spheres, each tangent to four specified tangent spheres.

1999 February 1 15:20.  Added subroutine aptcirk, to find the radii and center
coordinates of two circles, each tangent to three specified tangent circles.

1999 January 29 14:25.  Added subroutine aptsphl, to find the center coordinates
of a sphere tangent to three other tangent spheres of specified radii.

1999 January 5 18:00.  Added subroutine aptspht, to find the radii of two
spheres, each tangent to four tangent spheres with specified radii.

1998 December 15 18:30.  Added subroutine aptcirl, to find the center
coordinates of a circle of specified radius, tangent to two other tangent
circles of specified radii.

1998 December 14 17:30.  Added subroutine aptcirt, to find the radii of two
circles, each tangent to three tangent circles with specified radii.

1998 June 23 17:38.  Replaced calculation of quadric surface function in aptwhis
with a call to aptqval, and calculation of normal vector with call to aptqnor.

1998 June 2 16:10.  Changed aptwhis to avoid division by zero, and to keep
proximal point in proper quadrant for circular hyperboloids and oblate and
prolate ellipsoids; to make results more accurate for oblate and prolate
spheroids; and to make sure proximal point is on quadric surface.
Changed aptintq.
Updated in apt/src, libapt.a, aptflibe.
Kept aptwhis.f.old in apt/src.

1998 April 7 18:00.  Added subroutine aptqval, to find the value of a quadric
surface function at a specified point.  Tested in apt/test.

1997 December 18 17:00.  Added subroutine aptintq, to find the proximal points
or intersection between two quadric surfaces.

1997 December 17 15:40.  Fixed bug in aptwhis which caused floating point
error when doing a point on the x axis with an oblate spheroid.

1997 December 12 15:10.  Added subroutine aptripq, to find the triple point of
intersection of three quadric surfaces, nearest a specified point.

1997 December 3 14:40.  Corrected bugs in aptcris, to make radius of curvature
1.e99 whenever the curvature is (sufficiently close to) zero, to eliminate
angles 180 degrees apart, and to find center of curvature correctly.
Changed aptqext, to find maxima, minima and saddle points more accurately.

1997 October 31 17:10.  Put new subroutine aptcris in archives, documented.

1997 October 29 18:15.  Started subroutine aptcris, to find the radii of
curvature at a point, for a family of quadric surfaces.

1997 October 16 1:50.  Finished testing subroutines apttlod and aptetrp,
to randomly sample points in triangles and in tetrahedrons, respectively.
Both passed test.  Stored in apt/test.

1997 October 13 15:20.  Added subroutine aptqnor to find the normal
vector and tangent plane at a point, for a specified family of quadric
surfaces.

1997 October 8.  Gave copies of apttlod, aptetrp, and others to Nick Gentile.

1997 September 25 16:00.  Added subroutine aptpolf to factor out
a real root from a polynomial equation, reducing its order.

1997 September 22 18:00.  Finished changes in aptwhis to to general
5th-order solution of proximal points for hyperbolic paraboloids.
Tested in GEOM par.hyp.5th.test.

1997 September 19 18:00.  Finished changes in aptwhis to to general
5th-order solution of proximal points for elliptic paraboloids.
Tested in GEOM par.ell.5th.test.

1997 September 18 17:30.  Tested new logic for aptwhis in
~/work/util/test/main.f (TEST), for doing general 5th-order solution of
proximal points on elliptic paraboloids.  Made new GEOM test problem
par.ell.5th.test to compare TEST results with GEOM results and ran.

1997 September 17 14:10.  Changed aptaxis to further standardize
hyperbolic and parabolic cylinders and elliptic and hyperbolic
paraboloids.

1997 September 12 12:00.  Changed aptaxis to make standard qxx no less
than qyy when both are positive.  Changed aptwhis logic for 6th-order
solution to ellipsoid to make more accurate when external point is near
and axis, and to make external points insignificantly off-axis on-axis.
Added coding to aptwhis, to find proximal points for elliptic hyperboloids
of one or two sheets.

1997 September 3 13:20.  Added coding to aptwhis, to find proximal points
for a general ellipsoid.  Made minor changes to error tests in aptnewt,
to allow a little noise in xmin, xint, xmax.

1997 August 14 16:40.  Added subroutine aptpolr, to search for the roots,
extrema and inflection points of a polynomial equation, using
Newtonial iteration.

1997 August 12 17:00.  Added subroutine aptpole, to evaluate a polynomial
equation and its 1st and 2nd derivatives at a set of arguments, to search
for roots, extrema and inflection points.

1997 August 4 11:00.  Got printout of aptchtp form closed MEGNET aptflibe,
made changes in a copy of aptchty to make new aptchtp.  Compiles OK.
I hope it is all correct, for whenever I have to make a new aptchtp.o.

1997 August 3 16:00.  File aptchtp is BAD in aptflibe.
I can not add any files to aptflibe without making it go BAD.
I asked LC Hotline 2-4531 to try to get the aptflibe from July 7 or
earlier from their backup system.

1997 July 31 15:00.  Added subroutine aptnewt, to find a root of a
polynomial equation using Newtonial iteration.
Tested in aptnewt.DEC.

1997 July 30 14:50.  Changed aptbit(bfmrs) to make ibit arrays
integer*1, increase allowed word length from 128 to 640.
Tested in aptbit(bfmrs).DEC.

1997 July 28 17:00.  Rewrote aptbitp, to use a new method independent of
the way character data is stored.  Tested in atest.

1997 July 23 17:00.  Rewrote aptbite, to use a new method independent of
the way character data is stored.  Tested in atest.

1997 July 8 16:50.  Recompiled all subroutines, and new function
ranf, which just uses drand48, which I do not yet know the source of.
Subroutine aptqinc was missing the last few lines.  I faked the
essential parts, but the DEBUG output needs to be done right.  ERROR!!!

1997 June 12 16:15.  Replaced coding in aptwhis for hyperbolic cylinders,
to fin exact proximal distances, using quartic equation method.

1997 June 11 14:00.  Reformatted comments in aptaxis.

1997 May 6 16:00.  Added subroutine aptparx to find the points on a
parabolic trajectory with extreme values of the implicit equation for
a quadric surface.

1997 April 22 16:20.  Added subroutine aptparh to find the initial
velocity for a parabolic trajectory to intersect a specified point,
given the initial point on the trajectory, the initial speed, and
the constant acceleration.

1997 April 21 16:20.  Added subroutine aptparl to find the intersection or
proximal point of the parabolic trajectory of a uniformly accelerated
particle, with a specified straight line.

1997 April 18 14:40.  Added subroutine aptvpap to find the components
of a vector parallel to and perpendicular to another vector.

1997 April 17 11:15.  Changed subroutine aptcubs to use tolx = 1.e-11
for Newtonian iteration if tol = 0.  Changed subroutine aptplis to use
tolx = 1.e-11 if tol = 0.

1997 April 16 18:30.  Added subroutine aptpars to find the proximal or
intersection point of the parabolic trajectory of a uniformly accelerated
particle, with a specified point.

1997 April 15 16:20.  Added subroutine aptpart to find the initial
position and velocity, and the constant acceleration, of the parabolic
trajectory of a uniformly accelerated particle, given from one to three
points and times.

1997 April 11 15:30.  Added subroutine aptparq to find the intersections
of the parabolic trajectory of a uniformly accelerated particle path with
a quadric surface.
Tested in the geom code.

1997 March 25 17:50.  Added subroutine aptquar to find the real and
complex roots of a quartic polynomial equation.  Tested in the geom code.

1996 December 20 16:00.  Added subroutine aptparb to find points and
velocity along the parabolic path of a uniformly accelerated particle
at specified times, and subroutine aptparp to find the intersections or
proximal point of such a trajectory with a plane.

1996 December 9 16:35.  Corrected bug in aptcycy, causing garbage to be
stored in the location after that of the second proximal point,
(cxy, cy2, cz2).

1996 December 3 18:30.  Changed aptmaxw to use data statements for
xnsqs and ynsqs, to restore efficient calculation of random variable.
Removed xnsqs and ynsqs from local common block.

1996 November 6 18:00.  On megnet (closed labnet), retrieved the
source files for the bad subroutines below from the Cray archives,
from the last tar file before Nov. 20, 1995, and put then into
/h1/sss2/edwards/moveapt.tar.  Ken Underhill wrote that
file onto a floppy, that I read onto the open Compass Cluster.
I updated and compiled the subroutines, put the sources into aptflibe,
and the binaries into libapt.a.  All are apparently OK.
I also compiled and stored the binary of aptripv.

1996 November 1 13:50.
Renamed aptflibe aptflibe.old, renamed aptflibe.new aptflibe.
Renamed libapt.a libapt.a.old, renamed libapt.a.new libapt.a.
Restored comment blocks, "subroutine" lines to BAD subroutines,
put into aptflibe.  Also see files *BAD in aptflibe.

1996 October 29 18:30.  Compiled all subroutines.
Put updated source files into aptflibe.new, saved in archive.
Put updated binary files into libapt.a.new, saved in archive.

BAD SOURCE FILES (all added to aptflibe 951120):

aptqloc (900511, tested in tsals),
aptquad (891102, tested in dquads),
aptqupt (941109, called by aptqprr, tested in aptqupt.SUN),
aptquwt (900517, tested in trids),
aptqvac (900313, called by aptqinc, aptloc, tested in twods),
aptradv (901002, tested in tpros in geom).

NOTE:  convert old LIB libraries to UNICOS files:  rlib libname
NOTE:  convert old LRLTRAN files to UNICOS files:  ctou crayfile unixfile

1996 June 18 18:30.  Looked at all FORTRAN source files in aptflibe.
Subroutines aptqloc aptquad, aptqupt, aptqvac, aptquwt and
aptradv are all truncated.  Must restore from an old file!  TROUBLE!!!
NOTE:  last tested version should be in apt/test on Cray archives.
NOTE:  All current apt files are now in the open Compass Cluster, in
~edwards/work/apt .

1995 January 12 15:00.  Changed debug output in aptsolv.  Did test code
for aptsolv.

1995 November 28 17:00.  Added aptripv to find the vector triple product
of three vectors.

1995 November 20 17:10.  Added aptrips to find the scalar triple product
of three vectors (zero if they are coplanar).  This is the volume of a
parallelopiped with the three edge vectors at each vertex.

1995 June 13 16:30.  Added aptspha to find the center and radius of a
sphere, given the axis the center is on, and two points that the surface
passed through.

1995 May 15 14:20.  Added aptwirl and aptwist to twist points around an
axis, depending on either the radial or axial position.
Put aptwirl, aptwist, apt_base and apt_doc on U and Y (UNICOS) Crays.

1995 February 23 11:10.  Changed aptbrkn to find distances from each
point to each of the six bounding surfaces of the brick.  This added
dsurf(6,np) to the argument list.

1995 February 10 14:00.  Changed aptcubs to handle truncation error
better.

1995 February 8 17:20.  Changed aptcubs to handle truncation error better.

1995 February 7 10:50.  Changed aptaxis to avoid unnecessary rotations of
axes when coefficient qzz has a sign different than qxx and qyy.
This keeps qxx and qyy in descending order of absolute values.

1995 February 6 11:30.  Put aptplcy, aptplqu, aptqupr, aptspcy on U and Y.

1995 February 3 10:20.  Corrected errors in aptplqu.
Latus rectum was bad.  Also changed some length labels, added new output.

1995 February 1 11:50.  Added new subroutine aptqupr to find the
linear projection of a quadric surface in a specified direction.

1995 January 24 18:50.  Added new subroutine aptplqu to find the
distances, proximal points or lines, and any intersection curves
between a plane and a quadric surface.

1995 January 17 10:40.  Added subroutine aptplcy to find the proximal
lines on a plane and a circular cylinder, and the distance or overlap
between the surfaces, or the center and axis points of the ellipse of
intersection.

1995 January 5 14:30.  Added subroutine aptspcy to find the proximal
points on a sphere and a circular cylinder, and the distance or
overlap between their surfaces, and related information.
Tested in aptspcy.SUN in apt/test, and in the geom code.

1995 January 4 12:45.  Added subroutine aptcycy to find the proximal
points on two circular cylinders, and the distance or overlap between
their surfaces, and related information.
Tested in aptcycy.SUN in apt/test, and in the geom code.

1994 December 20 12:50.  Changed aptqprr and aptqprt to test for zero
distance from the quadric surface before iterating.

1994 December 16 13:30.  Changed aptqrts and aptqrtv to return any
complex roots of a quadratic equation, and to improve the header block.

1994 December 15 11:20.  Changed aptwhis to calculate exact proximal
points for parabolic cylinders and circular paraboloids, using aptcubs.

1994 December 12 11:30.  Added new debug output to aptcubs:  the
recalculated coefficients of the cubic equation.

1994 December 8 13:20.  Improved accuracy of aptcubs.

1994 December 6 11:20.  Corrected an error in aptcubs, to change from a
triple root to a real and two complex roots for x**3 + cc = 0.

1994 November 23 16:50.  Added subroutine aptcubs to find the real and
complex roots of cubic equations.  Test are in apt/test/aptcubs.SUN.

1994 November 18 17:30.  Modified subroutine aptwhis to return approximate
proximal points for all quadric surfaces without exact proximal points or
points of intersection of the normal from the external point, and to
return exact proximal points when possible, for external points at certain
symmetry points or on certain symmetry axes or planes.

1994 November 12 15:40.  Modified subroutine aptqprr to use x, y and z
directions, in addition to those from aptqupt and from input.
Modified subroutine aptqprt to use directions from aptqupt, and the x, y
and z directions, in addition to the input direction, and to make the
logic more efficient.

1994 November 9 14:20.  Added subroutine aptqupt to find extreme points
and main and symmetry axis intercept points on a quadric surface.
Changed aptqprr to call aptqupt, try vectors toward surface points
before trying random vectors.

1994 November 7 15:20.  Added subroutine aptqprt to find a proximal point
on a quadric surface by a second order method of steepest ascent.

1994 November 2 15:20.  Added subroutine aptqprr to find a proximal point
on a quadric surface by trying randomly sampled directions.

1994 October 31 16:00.  Changed subroutine aptvang to make angle cosines
near -1 exactly -1, and near 1 exactly 1.

1994 October 11 11:40.  Added arguments to subroutine aptrkis, to find
normal vector at intersection, cosine of intersection angle.

1994 October 4.  Added subroutine aptqexv to find the extrema of a quadric
surface in a specified direction.

1994 October 3.  Corrected error in defininition of nout in header section
of subroutine aptcomb.

1994 September 30.  Updated aptrkis, aptrins, aptrint on U and Y.

1994 September 28 16:30.  Fixed minor bug in aptrkis.  Updated on PHYSNET,
not on U or Y.

1994 September 22 17:10.  Modified subroutine aptrins and aptrint to allow
the minimum integer to exceed the maximum integer.  Updated on PHYSNET,
not on U or Y.

1994 September 15 13:00.  Deleted directory aptx/src and all of
it contents, on PHYSNET and on the archive.

1994 August 26 13:20.  Changed subroutine aptchtp to prevent a character
string from being interpreted as a floating point number if the mantissa
contains no digits, when an exponent is present.  Such strings as "e-3",
".+4", "-e2" and "+." were being interpreted as floating point zeros.

1994 August 8 11:20.  Added subroutine aptgrat to find the ratio for a
geometric series, when the first term, number of terms, and sum are given.

1994 July 11 14:10.  Corrected calls to aptmopv in aptwhis, to change
integer zero args 3-5 to floating point zeros.  Did on PHYSNET, U, Y.

1994 July 1 13:50.  Added an error test (nerr = 2) to aptmaxw, for a
rest mass erest that is not positive.

1994 June 27 18:10.  Corrected a bug in aptexps.  Output xran was
multiplied by sigma**2.  Added subrouting aptexpl, to randomly sample
from p(x) = exp (-sigma*x) for xa <= x <= xb (like aptexps, but with
x limits not 0 to infinity).

1994 June 20 17:20.  Corrected output vector "u" in subroutine aptcirp,
to make it a unit vector, as originally intended.

1994 June 17 16:40.  Added subroutine aptwhis to find the side, distance
and proximal point(s), for a point near a quadric surface.

1994 June 13 14:00.  Made constants in aptdode more accurate.

1994 June 7 14:10.  Changed subroutine aptqext to not look for extreme
points on cones.

1994 June 6 10:50.  Changed subroutine aptbrkv to truncate all small
residuals to zero, based on tol.  Did on PHYSNET, U, Y.
Changed subroutine aptaxis to make choice of order of axes insensitive
to small differences in coefficients.  Did on PHYSNET, U, Y.

1994 May 4 15:00.  Changed subroutine aptchai to allow a hexadecimal
number to have either or both lower and upper case letters a, b, c, d,
e and f.

1994 April 29 15:00.  Changed subroutine aptqexc to put minimum before
maximum, when both are found as a pair of roots.  Corrected subroutine
aptqext to find the extrema of cylindrical quadric surfaces with an
axis perpendicular to a major plane, but not parallel to a major axis.
Updated on PHYSNET, not on U or Y.

1994 April 25 13:45.  Changed subroutine aptqext to ignore any extreme
points for which the normal vector is null, within tolerance limits.
This eliminates saddle points at the vertex of a cone.

1994 April 18 15:50.  Added subroutine aptqext for finding any minimum,
maximum or saddle points in a quadric surface, and for finding the type
and center of symmetry of the surface.

1994 April 15 16:20.  Changed aptqrts and aptqrtv to put two roots in
increasing order.

1994 April 11 17:45.  Added subroutine aptqexc for finding any minimum or
maximum points in a quadric curve in a major plane.

1994 April 7 18:30.  Fixed bug in subroutine aptaxis.  Was classifying
a parabolic cylinder of form qy * y + qxx * x**2 = 0 as coincident planes.

1994 March 25 17:00.  Added subroutine apttrig for finding all geometric
data for a single triangle in 3-D space, specified by its three vertices.

1994 March 3 12:00.  Added 4 subroutines aptbrkn, aptbrkp, aptbrks and
aptbrkv, for seeing if a point is in a brick, for finding the coordinates
of a point specified by the fractional distances across the brick, for
randomly sampling a point in a brick, and for finding the minimum and
maximum coordinates, edge lengths, face areas and the volume.  A brick is
bounded by surfaces of the coordinate system (rectangular, cylindrical or
spherical).  Tested in aptx/test and in geom.

1994 February 25 10:00.  Corrected bug in aptchtp, which caused wrong
results for a floating point number with more than 30 characters.

1994 February 17 14:50.  Corrected definition of nopt in aptprcy, for
nopt = 1.  "... the initial radial component to rcyl" -> "... rcyl to the
initial radial component."

1994 February 15 16:00.  Added comment defining vector "u" to aptclis.
Changed aptrkis to truncate dint to zero if less than tol times the
magnitude of the vector from the origin to point "a".

1994 February 4 14:10.  Added subroutine aptsclr to find the operator to
do cylindrical scaling around a specified axis in 3-D space, and to use
the operator on a specified set of points.  Similar to aptscll, aptsclu.

1994 January 5 17:50.  Modified aptlnln to allow truncation of coordinates
of proximal points.

1993 December 6 15:20.  Added final argument nerr to all calls to aptqrtv,
in aptfdqc, aptlnic, aptqfdc, aptrkcl, aptrkcy, aptrkis, aptrkrl.
Use caused "Segmentation Error" on PHYSNET.
Corrected use of tol in apttris.  Error caused very small changes to be
ignored.

1993 October 13 17:20.  Replaced all "c***debug begins." with
"c____ DEBUG begins." and all "c***debug ends." with "c____ DEBUG ends.".
Remade aptflibe, stored in archives.

1993 June 3 15:40.  Added aptintp to interpolate or extrapolate in the uv
plane, give two points and a u coordinate, with options for linear-linear,
linear-log, log-linear or log-log interpolation or extrapolation.

1993 May 17 14:00.  Added aptmnmx to find the values and indices of the
minimum and maximum values of a floating-point array.  Added aptmnlg to
find the values and indices of the maximum and minimum positive values in
a floating-point array, with the minimum no less than a specified number
of decimal decades below the maximum.

1993 May 4 10:20.  Modified and tested aptil08, for tiling a unit sphere
with 8 * 4**N triangles, N = 1, 2, 3, ...  Updated all apt files.

1993 April 30 17:00.  Added aptcomb to find all combinations of N things
taken M at a time, aptperm to find all permutations of N things taken
M at a time.

1993 April 29 17:10.  Deleted apt_doc and apt_base from aptflibe.  Updated
apt_doc, apt_base, aptflibe and libapt.a on PHYSNET, A, U and Y machines,
and in archives.  Source of apt_doc and apt_base is now in apt/doc, and in
apt/src via soft link to apt/doc.

1993 April 29 15:40.  Added aptclis to find the equation for a right
circular cylinder with a specified axial point, axial direction and
radius.

1993 April 28 16:00.  Added aptsphp to find the sphere through four
specified points in 3-D space.

1993 April 28 11:30.  Added aptcirc to find the circle through three
specified points in a major plane.

1993 April 27 17;30.  Added aptcirp to find the circle through three
specified points in 3-D space.

1993 March 24 17:00.  Copied all files on "U" machine onto "Y" machine.

1993 March 24 15:30.  Made file apt_summ in apt/doc, summarizing the apt
system directories, subdirectories and files.

1993 March 16 18:00.  Fixed a bug in aptchin, which affected
decrementing characters 1, b and B.  Remade aptflibe and libapt.a on
PHYSNET, A and U machines.

1993 March 8 16:00.  Replaced all of the source files in aptflibe with
the experimental versions, with the debug sections commented out with a
"cbug" in columns 1-4.  This was done after making sure the rest of the
coding in the experimental versions agreed exactly with that in aptflibe,
making corrections in both where necessary.  From now on, only one set of
source files needs to be maintained, since the debug sections may be
reimplemented by one of the commands:
     :%s/^cbug//                              (in vi)
     sed 's/^cbug//' aptfile.f > aptfilx.f
Put the new aptflibe on the "A" and "U" machines.

1993 March 4 15:00.  Compiled and put aptchip into aptflibe and libapt.a
on the "A" and "U" machines, and on the PHYSNET.

1993 March 3 16:00.  Made and tested new subroutine aptchip, to find,
count, and optionally replace with a new character, and optionally save
the locations of, any non-graphic characters in a character string.

1993 February 19 17:00.  Added three subroutines, aptffip, aptchap, and
aptchtp, analogous to aptffin, aptchat, and aptchty, except that ASCII
words may have any number of characters, any field delimiter may be
specified, and the length of ASCII words is returned.
Updated, compiled, and put into aptflibe and libapt.a on UNICOS "A"
machine, and on the PHYSNET system, and into archives.

1993 February 18 11:00.  Modified aptchsq to make output argument nout
the number of remaining characters after squeezing out characters, instead
of the index of the last remaining character.  Compiled and put into
libapt.a on the "A" and on the PHYSNET system.

1993 January 11 17:00.  Compiled aptchin on PHYSNET, made new libapt.a in
work/apt/src and in work/lib.  Put libapt.a into .245100/sun4/libapt.a.

1993 January 11 11:00.  Corrected an error in aptchin:  aschar(ne+idir) ->
aschar(nd+idir).  Error was made 1992 December 16.  Made and put new
aptflibe in .245100/unicos/aptflibe and .245100/unicos/aptf.930111.

1993 January 4 15:40.  Recompiled all apt subroutines on meg3 system,
using -O3 compile option, except aptmprd and aptsolv, which failed with
that option, so I used -g compile option instead.  I made a new libapt.a
in /h/meg3/edwards/work/apt/src and in /h/meg3/edwards/work/lib.
It includes ranf.o.  Put libapt.a into .245100/sun4/libapt.a.

1992 December 29 18:00.  Stored a new aptflibe = aptf.921229 in archive
.245100/unicos/aptflibe and .245100/unicos/aptf.921229.  Contains new
aptsorm.

1992 December 29 11:40.  Revised and recompiled aptsorm on the PHYSNET
system, so it would work with 32-bit integer words.  Made aptsorm.o, put
into ar library libapt.a in PHYSNET ~/work/lib.

1992 December 18 16:50.  Compiled all apt subroutines on the PHYSNET
system, in /h/meg3/edwards/work/apt/src, put the .o files into ar library
libapt.a, copied it into /h/meg3/edwards/work/lib.
I included a copy of ranf.o in libapt.a, obtained from Lee Busby's files,
which I copied into /h/meg3/edwards/work/random.
NOTE:  I did not use the -O3 option on the compiler line.  Should I have?

1992 December 17 18:20.  Made a test code in PHYSNET ~/work/util/test.
Can try apt subroutines there.

1992 December 17 14:10.  Replaced all apt****.f files in "A" apt/src with
the same version as in PHYSNET apt/src/.  All "[de][+-]" patterns are now
only floating-point exponents.  A few non-floating-point "[de] -" patterns
exist that originally had no spaces.  Also, the "Source" lines in the
subroutine headers was changed.  A tar library of all apt source
files is in archive .245100/unicos/aptflibe and in archive
.245100/unicos/aptf.yymmdd, where yymmdd is year, month and day.

1992 December 16 15:00.  Made directory /h/meg3/edwards/work/apt/doc
on the PHYSNET.

1991 October 5 15:45.  Changed aptbits to allow output argument wordb to
be the same as input argument worda.  Remade bld library libapt.a.

1992 September 10.  Moved all files from the UNICOS "H" machine to the
UNICOS "A" machine.  Duplicated all directory structures and modes.

1992 September 1 14:20.  Made a bld library of the compiled binary APT
subroutines, named libapt.a, in directory /w1/i/edwards/lib and
/w1/i/edwards/apt/src.

1992 August 28 13:00.  Moved all apt source files to the "H" machine
in directories /w1/i/edwards/apt/doc and /w1/i/edwards/apt/src.
Compiled all source files "apt????.f" to make binary files "apt????.o".

1992 August 21 15:30.  Added aptffin to read and crack free-format
input lines.

1992 June 4 10:00.  Revised aptscap to make it more efficient.

1992 May 22 14:20.  Removed equivalences to dummy arguments in
aptbite, aptbitp and aptword in aptflibe, for compatibility with
CFT77 on UNICOS.  [Should retest subroutines!]    NOTE NOTE NOTE NOTE

1992 May 20.  Replaced all arguments of the random number function
ranf with blanks, for compatibility with CFT77 on UNICOS.

1992 March 11 18:00.  Added aptchai to translate from an ASCII octal,
decimal or hexadecimal character string to binary integer.
Updated all documentation and files.

1992 March 10 13:30.  Made new LIB library aptflibe, containing ANSI
Standard FORTRAN source files for all APT subroutines.  All CIVIC
directives were deleted.  All appended comments were moved to a line
preceding the original line.  All CIVIC code blocks were removed, and
the corresponding Standard FORTRAN code blocks decommented.
These changes may be made with TRIX alter file ALTSTD, and by using
STRIP and TRIX AC or TRIXGL.

1992 March 8 13:20.  Bracketed all cvmgt statements in APT modules
with "c***civic begins." and "c***civic ends.".
These code blocks can be commented out or deleted with STRIP.
Bracketed all equivalent STANDARD FORTRAN statements with
"c***std begins." and "c***std ends.", and commented out those code blocks
with the four characters "cstd", starting in column 1.
These code blocks can be decommented with TRIX.
Changed the syntax for appended comments from "$$c" to "!".
Replaced all "aptblibe" with "aptbliba and aptbliby" in comments.

1992 March 5 16:40.  Changed directory names from aptslibh to aptslold,
aptblibh to aptblold, to avoid confusion with files for "H" machine.
These directories contain old versions of aptslibe, aptbliba and aptbliby.
To list on a Cray:  xp slst .245100[aptslold aptblold] lev. 2 / t v.

1992 March 5 16:40.  Added aptchfs to find a symbol (delimited character
string) in another character string.

1992 March 5 10:10.  Added aptbitf to find any occurrence of a specified
bit string in a machine word.

1992 March 4 15:00.  Added aptchfp to find any occurrence of a specified
character string in another character string.

1992 March 3 16:20.  Added aptbitr to insert a random bit string anywhere
in a machine word.

1992 March 2 13:50.  Added aptbits for shifting the bits in a word
right or left, pulling in bits from another specified word.
Added aptbitb to do Boolean operations "comp", "int", "un" and "xor"
on machine words.  See 2004 July 30.

1992 February 28 17:20.  Added aptbitm to move a bit string from any
location in one word to any location an another word.

1992 February 28 13:40.  Added aptbitp to pack a bit array back into
full words.  Reverses the effect of aptbite.

1992 February 27 16:00.  Added aptbite to expand full words into a bit
array, with each bit right-adjusted and left-filled with zeros, in its
own word.  Added code bite in bitelibe for testing aptbite.

1991 December 12 14:00.  Added aptrfps (scalar) and aptrfpt (vector) to
randomly sample floating-point values from a specified range of values,
with any degree of striation (aptrfpt only).
Updated all documentation and files.

1991 December 12 11:00.  Added aptrins (scalar) and aptrint (vector) to
randomly sample integer(s) from a sequence of integers, with any degree
of striation (aptrint only).

1991 December 10 17:00.  Added aptchsq to squeeze characters out of a
character string and right-fill with blanks.
Updated all documentation and files.

1991 December 7 11:50.  Added aptchrn to replace characters in a character
string with random characters, sampled from a specified set.
Updated all documentation and files.

1991 December 6 11:00.  Modified aptchia to allow number base to be
octal, decimal, or hexadecimal.
Updated all documentation and files.

1991 December 5 18:00.  Added aptchia to translate an integer into
ASCII characters and store the result in a character string.
Updated all documentation and files.

1991 December 4 16:00.  Added an argument to aptchat, and modified
aptchat to allow any data field delimiter, not just blanks.
Modified aptchty to allow leading, trailing, and certain imbedded
blanks in the data string.  Updated all documentation and files.

1991 December 2 15:30.  Added aptchat to separate a character sting into
delimited data fields, and translate the fields into character and/or
integer and/or floating-point words.

1991 November 27 14:30.  Added aptchty to translate a data field into
character and/or integer and/or floating-point words.

1991 November 22 13:00.  Added aptchin to increment or decrement ASCII
character strings containing numeric and alphabetic (lower and upper
case characters).  Useful for forming file names.

1991 November 19 15:40.  Reordered the argument list in aptchmv.
Added aptchrp to replace individual characters in a character string,
using a table of initial and replacement characters.

1991 November 18 16:20.  Added aptchmv to move a character or character
string from one word or array to the same or another word or array,
in any character position.

1991 October 10 17:20.  Modified aptdeld to take advantage of the
huge speedup possible when the table has already been sorted.
Added an input argument, making old versions obsolete.

1991 October 7 17:40.  Added aptdeld to eliminate lines from a 1-D or
2-D array containing values in 1 or more specified columns that are
duplicates of the values in the corresponding columns of another line.
Reduces a 1-D array to unique values.

1991 August 26 17:30.  Added aptscav to be like aptscap, but have a
different axis vector for each sampled vector.

1991 August 22 16:20.  Changed aptsorm, aptsort and aptword to remove
non-standard FORTRAN coding for ASCII string tests, replaced with
standard FORTRAN "character*8" declarations and character procedures.
This is the LAST non-standard FORTRAN, except for CVMGT and OPTION
statements, and appended comments.  There are no more BYTE statements.

1991 August 6 10:30.  Added aptscmz (scalar) and aptscma (vectorized) for
randomly sampling from a uniform PDF at a specified angle from a major
axis, for more efficiency when an arbitrary axis is not required.

1991  August 2 11:00.  Added aptnerr to test error flags returned by other
APT subroutines, and write error messages to specified IOC units,
giving the source and location of the error, and providing options
to return or to terminate the run, with or without the drop file.

1991 July 30 16:00.  Added subroutine aptvusz, a scalar version of
aptvunb, for more efficient use in scalar codes.  (TART)

1991 July 30 18:00.  Modified aptlook, aptsorm, aptsort, aptvlim, aptvuna,
and aptvunb to initialize NERR to zero, as in all other subroutines
using NERR.  Omission should not have affected any users.

1991 July 29 11:00.  Added subroutine aptvunz, a scalar version of
aptvuna, for more efficient use in scalar codes.  (TART)
Added test code ttars to test aptscaz, aptsciz, aptvunz, aptvusz.

1991 July 26 14:00.  Added subroutines aptscaz and aptsciz, scalar
versions of the vectorized subroutines aptscan and aptscat, for
more efficient use by codes doing scalar calculations.  (TART)

1991 July 25 16:00.  Revised aptrotv to select an arbitrary rotation axis
when the initial and final vectors are parallel or antiparallel.
Added test code trovs in trovlibe to test aptrotv and aptscan.

1991 June 11 15:10.  Added aptspar to randomly sample points on a line,
in a parallogram, or inside a parallelopiped.

1991 June 6 14:00.  Added aptscnv to randomly sample points in a frustrum
or a right circular cone.  Includes an annulus, or only the outer
curved surface.

1991 May 24 11:00.  Added aptscns to randomly sample points from the
curved surface of a frustrum of a right circular cone.

1991 January 29.  Deleted all files specific to the "E" machine.
Updated all documentation to reflect removal of "E" machine.
Moved all testing and maintenance files to the "A" machine.

1991 January 7.  Added test code tmovs for aptmovs.  Added tests for
aptrkis in aptsur.  Added test code tbavs for aptvdoc, aptvdot.
Extended key word index.

1990 December 28.  Added an alphabetic index of key words to apt_doc.
Contains over 1600 entries to subroutines.
Reorganized test codes and their documentation.

1990 December 17.  Added aptplis to find the intersection of a major
plane with a quadric surface.

1990 December 13.  Added aptesis to find the equation of an ellipsoid
centered at the origin and aligned with the major axes, given the
three semiaxes.

1990 December 12.  Added aptcyis to find the equation of a cylinder
symmetric around a major axis, given the radius.

1990 December 10.  Added aptelis to find the equation of an ellipsoid or
hyperboloid of two sheets, symmetric around a major axis, given the
center and two points.

1990 December 7.  Added two subroutines to find the equation of a cone,
symmetric around a major axis, given the vertex coordinate and angle
(aptcois), or two points (aptcnis).

1990 December 5.  Revised most subroutines to remove unneeded CVMGT
statements, and to precede others with commented standard FORTRAN
equivalents.  Ran all test codes to verify subroutines.

1990 November 14.  Revised aptaxis to use an explicit method, and to
return the classification of the surface.

1990 October 30.  Changed apttran to allow vector "a" to be zero,
without setting nerr = 2.  Added aptaxis to find the principal axes and
center of a quadric surface specified in implicit form, and transform
the implicit equation to the standard form.

1990 October 23.  Changed argument names to apttrip from xmin, ymin, zmin
to qx, qy, qz.  Changed nomenclature in comments, to replace "side"
with "edge" when referring to lines or curves bounding surfaces.

1990 October 19.  Added aptsolv to aptblibe, aptbliba, aptbliby.

1990 October 18.  Added aptsolv to solve a set of simultaneous linear
algebraic equations by Gauss-Jordan elimination with partial pivoting.
Also does general matrix inversion of non-singular matrices.

1990 October 16.  Added aptrois to recalculate the coefficients of the
implicit equation of a quadric surface due to operating with a 3x3
matrix operator, representing reflection, rotation, inversion, and/or
scaling, relative to an invariant point.  Updated all documentation.
Remade aptblibe, aptbliba, aptbliby, stored.

1990 October 12.  Revised apt_doc and all subroutine comment blocks to
show that there are now three BUILD libraries of Cray-compiled
modules, aptbliba for the "A" machine, aptblibe for the "E" and "G"
machines, and aptbliby for the "Y" machine, all with linkage type 1.
All are available with xp read .245100:aptblibL, where "L" = a, e, or y.
Temporarily, aptblibe is also still in aptslibe.

1990 October 11.  Added apttris to recalculate the coefficients of the
implicit equation of a quadric surface due to translation of the origin.

1990 October 5.  Added aptprsp to project a set of points onto a sphere
in 3-D xyz space, with several options.  Added aptprop to project a set
of points perpendicularly onto a plane in 3-D xyz space.

1990 October 3.  Added aptproc to project a set of points radially onto a
circle in a major plane, aptpros to project a set of points radially
onto a sphere in 3-D xyz space.  Added aptprcy to project a set of
points onto a cylinder in 3-D xyz space, with several options.

1990 October 2.  Added aptradv for making a 2-D geometric view factor
projection of an array of points in 3-D xyz space.

1990 October 1.  Added aptpers for making a 2-D perspective view of an
array of points in 3-D xyz space, aptperc for making a 1-D perspective
view of an array of points in a major plane.

1990 September 21.  Added aptvdos to find the dot product of a single
vector with one or more vectors.

1990 September 20.  Added aptpoly to generate regular polygons in a
major plane, given the number of edges and the coordinates of the
center, one vertex, and another point in the plane of the polygon.

1990 September 18.  Added aptpolc to generate regular polygons in a
major plane, given the number of edges and the coordinates of the
center and one vertex.

1990 August 29.  Added aptlook to do a table look-up by the binary
search method, in a table with any interval, ascending or descending.

1990 August 24.  Added aptcumt to randomly sample bin indices in
packed cumulative PDFs, with a different PDF for each sample.

1990 August 22-23.  Added aptalst to randomly sample bin indices in
packed aliased PDFs, with a different PDF for each sample.

1990 August 21.  Checked all comment blocks and dimension statements.
Added size info in "Glossary" section of many subroutines.
Put several dimension statements into alphabetic order.

1990 August 16.  Added aptnorm to randomly sample values from one or
more Normal probability distribution functions.  Added aptexps to
randomly sample from one or more exponential probability distribution
functions.

1990 August 14.  Added apteqxs for sampling x values from a set of
equal-probability bins (which may be generated by apteqxn).
Added aptscar to randomly sample directions in 3-D space from a
uniform or cosine**pm distribution with a specified axis, and within
a specified range of angles from the axis.

1990 August 13.  Added apteqxn for finding the equal-probability bin
x boundaries for a piecewise continuous PDF for x.  Changed apteqin
to add an output argument, the smallest bin probability.

1990 August 10.  Removed aptppdf.  Its functions are included in other
subroutines.  See 1990 July 20.

1990 August 7.  Added apteqin to find the equal-probability bin indices
for a histogram or a piecewise linear PDF, apteqsb to randomly
sample bins from an array of equally probable bin indices.

1990 July 30.  Added aptword to test the members of an array to see
if they are between two specified limits, in any mode
(alphanumeric, integer or floating point).

1990 July 25.  Added aptsort and aptsorm to sort 1-D and 2-D arrays
in ascending or descending order of one or more columns, in any mode
(alphanumeric, integer or floating point).

1990 July 20.  Added aptppdf to test a piecewise linear probability
distribution function for errors, and remove any intervals with
negative probability.  Added aptrand to randomize the order of an array.
Added aptrans to sample from an array, without replacement.

1990 July 19.  Added aptalsl to randomly sample values from a list of
specified bins, each with a linear distribution.

1990 July 18.  Added aptcump to find the cumulative probability
distribution function for a histogram or a piecewise linear
probability distribution function.  Added aptcums to randomly sample
bins from a cumulative probability distribution function.

1990 July 17.  Changed aptalin to include the option of aliasing any
piecewise linear probability distribution function.

1990 July 9.  Added aptalsb to randomly sample bins from an aliased
probability histogram, and aptalsh to randomly sample values from a list
of specified bins, each with a uniform distribution.

1990 June 28.  Added aptalin to alias a probability histogram
for random sampling.

1990 May 29.  Added aptlntr to find the distance along a line to a plane
specified by 3 points in xyz space (modification of aptlnpl).

1990 May 17.  Added aptetrw to find the point in a tetrahedron or
quadrangle with given vertex weights.  Added aptquwt to find the point
in a quadrangle with given local coordinates.

1990 May 16.  Added aptrefq to analyse the 3 by 3 reflection matrices
produced by aptrefs and aptmprd.  Added aptrotq to analyse the 3 by 3
rotation matrices produced by aptmprd, aptrota, aptrotp, aptrots,
aptrott and aptrotv.  Added aptetrn to find the distances of a point
from the triangular faces of a tetrahedron, and whether the point
is inside or outside the tetrahedron.  Added aptrlop to find the point
in an xyz space triangle with given vertex weights.  Added aptrloc to
find the point in a major plane triangle with given vertex weights.
1990 May 15.  Added aptripl to find local coordinates of points in
triangles in 3-D space.

1990 May 14.  Added aptripc to find local coordinates of points in
triangles in a major plane.

1990 May 11.  Changed aptqloc and aptetrp to use new arguments to
apttloc and apttlod.  Added aptetrl to find local coordinates of points in
tetrahedrons.

1990 May 10.  Changed arguments in apttloc and apttlod from fdk, fdl to
kloc, wa, wb and wc.

1990 May 9.  Added aptetrp tp randomly sample points in a tetrahedron.
Added aptript to find the distance from a triangle to a point.

1990 May 8.  Added apttric and apttrid to find the edge lengths, the
areas, and the centers of gravity of triangles in a major plane,
and in 3-D space, respectively.  Added apttetd to find the volume and
center of gravity of a tetrahedron in xyz space.

1990 May 7.  Deleted arguments tolu, tolv, tolw from both aptscap and
aptscat.  Option may by exercised by calling aptvlim or aptvtol.
Updated aptlocs, aptscap to eliminate above arguments in aptscat calls.
Added apttlod to randomly sample points from a triangle in 3-D space.

1990 May 4.  Added aptlocs to randomly sample points in a spherical
annulus.

1990 May 3.  Added aptlocy to randomly sample points in a right circular
cylindrical annulus, and aptlocd to randomly sample points on the
surface of an annular disk.
Added aptspod to randomly sample values on an interval, based on a
power-law distribution.

1990 May 1.  Added aptscan to randomly sample directions at specified
angles from specified directions.

1990 May 1.  Changed aptscap to use trig functions instead of
rejection method.  New method faster, easier to read.

1990 April 30.  Recompiled all subroutines on E machine.  Makes
aptblibe compatible with E and F machines.

1990 April 30.  Changed aptscat to use trig functions instead of
rejection method.  New method faster, easier to read.
See 1990 May 7.

1990 April 5.  Added aptpbln to find the plane which perpendicularly
bisects a line, and aptpblc to find the line that perpendicularly
bisects a line in a major plane.
Added aptvplp to find the projection of a vector on a plane.
Added aptvcvc to find the projection of a vector on a vector in
a major plane.

1990 April 3.  Added aptvsuc, aptvsum to find the weighted sum of two
vectors.  Generalize functions of aptvdic, aptvadc, aptvdis, aptvadd.

1990 March 30.  Fixed array index errors in aptbanc, aptbang, aptmovs,
ampmvcy that caused errors for input arrays larger than 64.

1990 March 21.  Added aptlnic to find the 2 points of intersection of
a line and a circle in a major plane.

1990 March 19.  Added aptcinc to find the 2 points of intersection of
two circles in a major plane.

1990 March 19.  Added aptspsp to find the circle of intersection between
two spheres.

1990 March 16.  Added aptplsp to find the circle of intersection between
a plane and a sphere.

1990 March 15.  Changed aptptpl, aptlnpl, aptplpl, aptrkpl to give
different results when the input values for a plane are no good.
No effect when the input data is good.

1990 March 14.  Changed tol to 0.0 in all calls to subroutines
aptvuac, aptvubc, aptvuna and aptvunb from
aptdist, aptlnln, aptlnpl, aptmovs, aptmvcy, aptplpl, aptptpl, aptrefs,
aptrkis, aptrklc, aptrkpl, aptrota, aptrotc, aptrotp, aptrott, aptsclc,
aptscll, aptvanc, aptvang, aptvxun.  No effect on results except when
input arguments are in error.

1990 March 13.  Changed several subroutines to eliminate truncation of
vector components to zero, based on their being small compared to
the vector magnitude:  aptinvp, aptmopv, apttran, aptvaxb, aptrotc,
aptrefc, aptvplc, aptinvc, apttrac, aptrefl.  This option is available
in aptvtoc, aptvtol.

1990 March 13.  Added aptsclu to do uniform scaling in 3-D xyz space.
A negative scale factor combines inversion, scaling.

<*><*><*><*><*><*><*><*><*><*><*><*><*><*><*><*><*><*><*><*><*><*><*><*>**

CHANGES TO aptslibe, aptblibe FROM 1990 FEBRUARY 9 TO FEBRUARY 27:

Added aptbanc to find the bisectors of angles in a major plane.

Added aptbang to find the bisectors of angles in 3-D xyz space.

Added aptconl and aptconm to find the values of the fundamental
physical and chemical constants, and energy conversion factors.
Units are cm-g-shake-Kev (aptconl) and SI (aptconm).

Changed aptptlc to add option of finding fractional distance of proximal
point along line, and a flag if limited, returned as arguments
fdmin and nlim.

Changed comment lines in aptptln.

Changed aptptln to fix bug affecting fdmin when np exceeds 64.

Added aptqdic to find the distances from a point to the edges of a
quadrangle in a major plane.

Added aptqinc to find if a point is in a quadrangle in a major plane,
and the minimum distances from the point to the quadrangle edges.

Changed aptqloc to call aptqvac with the correct to find ntype.
Changed to do boomerangs and bowties right.

Changed aptqvac to add calculation of any bowtie points, returned as arguments
qu, qv.

Added aptrkis to find the intersection of a linear track with a general
second-order surface given by f(x,y,z) = 0.

Added aptscad to sample randomly from a uniform distribution of 3-D
spatial vectors in a specified plane.

Added apttinc to find if a point is in a triangle in a major plane, and
the minimum distances from the point to the triangle edges.

Changed aptvadc, aptvadd, aptvdis, aptvpln to eliminate truncation of
vector components to zero based on their being small compared to the
vector magnitude.  Still truncate based on estimated component error.

Added comment lines to aptxnup.

<*><*><*><*><*><*><*><*><*><*><*><*><*><*><*><*><*><*><*><*><*><*><*><*>**

CHANGES TO aptslibe, aptblibe FROM 1990 JANUARY 11 TO FEBRUARY 8:

Added 14 subroutines:

aptfdqc - given u, v, find local coordinates in a quadrangle.
aptmaxw - sample from a relativistic Maxwellian distribution.
aptmean - find the mean and standard deviation of a set of values.
aptqloc - sample u and v uniformly over a triangle or planar quadrangle.
aptqver - find vertex areas and shape of planar quadrangles.
aptrkcl - find intersection of 3-D track with 1-D cylindrical surface.
aptrkrl - find intersection of 3-D track with 1-D spherical surface.
aptrksl - find intersection of 3-D track with 1-D slab surface.
aptrnds - round off a floating point value to a specified precision.
aptslid - sample a set of values from a linear distribution.
aptsliv - sample one value from each of a set of linear distributions.
apttloc - sample u and v uniformly over a triangle.
aptvdil - find the distance between two points on a major axis.
aptxnup - sample from a Planckian or a Wien frequency spectrum.

Note:  u and v are spatial coordinates in uvw space.


Changed 2 subroutine names:

aptvuna (was aptvun1) - replace a 3-D vector with a parallel unit vector.
aptvunb (was aptvun2) - find the unit vector parallel to a 3-D vector.

<*><*><*><*><*><*><*><*><*><*><*><*><*><*><*><*><*><*><*><*><*><*><*><*>**


UCRL-WEB-209832