cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c c APT DATA BASE - FILES AND SUBROUTINES c c File: apt_base c c Author: Arthur L. Edwards (email: xenopsbird@comcast.net). c c Version: Updated 2007 February 12 18:20. c Originated 1989 November 15 14:20. c c Sources: GPS: ~edwards/work/apt/doc/apt_base c c Purpose: Data base for APT Subroutine Library and related files. c c To extract definitions containing any desired key words: c c grep -p -e 'keyword1' -e 'keyword2' ... apt_base > outfile c cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc FLAG ITEM LOCATION DESCRIPTION OR DEFINITION cs apt_base apt/src Data base for the files in ~edwards/work/apt cs aptacct apt/src Subroutine for finding the position, velocity and cs acceleration of a particle with a time-dependent cs acceleration, at specified times. cs See aptparb, aptparh, aptparl, aptparp, aptparq, cs aptpars, aptpart, aptparx. cs Tested by apt/test/aptacct.DEC. cs aptafac apt/src Subroutine for finding all unexponentiated factors of an cs integer. See aptcmad, aptmord, aptpfac, aptpfft, cs aptprim. cs Tested by apt/test/aptafac.GPS . cs aptalin apt/src Subroutine for aliasing a probability histogram, or a cs general piecewise linear PDF, in preparation for cs random sampling. cs See aptalsb, aptalst, aptalsh, aptalsl. cs Tested by tapls in tapllibe . cs Tested by tpals in tpallibe . cs aptalsb apt/src Subroutine for randomly sampling bins from an aliased cs PDF, with an option for striating. cs See aptalin, aptalst, aptalsh, aptalsl. cs Tested by tapls in tapllibe . cs Tested by tpals in tpallibe . cs aptalsh apt/src Subroutine for randomly sampling values from a list of cs specified bins, each with a uniform PDF. cs See aptalin, aptalsb, aptalst, aptalsl. cs Tested by tapls in tapllibe . cs Tested by tpals in tpallibe . cs aptalsl apt/src Subroutine for randomly sampling values from a list of cs specified bins, each with a linear PDF. cs See aptalin, aptalsb, aptalst, aptalsh. cs Tested by tpals in tpallibe . cs aptalst apt/src Subroutine for randomly sampling indices in a packed cs array of aliased PDFs, where each sample may be from cs a different aliased PDF. cs See aptalin, aptalsb, aptalsh, aptalsl. cs Tested by tpals in tpallibe . cs aptatob apt/src Subroutine for copying the digits 0-9 in a character cs string into separate integer words. cs Tested by test/aptatob.GPS. cs See aptatob, aptbadd, aptbasb, aptbdiv, aptbexp, cs aptbfac, aptbmul, aptbpac, aptbpow, aptbrev, aptbrtn, cs aptbsub, aptbsum, aptbtod, aptdtob, aptftob, aptltob, cs aptpfab, aptbcat. cs aptaxis apt/src Subroutine for finding the center, the principal axes, cs and the classification of a quadric surface specified cs by an implicit equation, and transforming the cs implicit equation to the standard form. cs See aptcnis, aptcniz, aptcois, aptcyis, aptelis, cs aptesis, aptplis, aptqext, aptrkis, aptrois, apttris. cs Tested by tsurs in tsurlibe . cs aptbadd apt/src Subroutine for adding two big integers, stored as arrays cs of digits in a specified number base. cs See aptatob, aptbadd, aptbasb, aptbdiv, aptbexp, cs aptbfac, aptbmul, aptbpac, aptbpow, aptbrev, aptbrtn, cs aptbsub, aptbsum, aptbtod, aptdtob, aptftob, aptltob, cs aptpfab, aptbcat. cs Tested by apt/test/aptbadd.GPS. cs aptbanc apt/src Subroutine for finding the bisector of an angle in cs a major plane, and the intercept on the opposite edge cs of the triangle defining the angle. Vectorized over cs a set of such cases. cs Tested by twods in twodlibe . cs aptbang apt/src Subroutine for finding the bisector of an angle in cs 3-D space, and the intercept on the opposite edge cs of the triangle defining the angle. Vectorized over cs a set of such cases. cs Tested by trids in tridlibe . cs aptbasb apt/src Subroutine for finding the value of a big integer, cs stored as an array of digits in a specified number cs base, in another specified number base. cs See aptatob, aptbadd, aptbasb, aptbdiv, aptbexp, cs aptbfac, aptbmul, aptbpac, aptbpow, aptbrev, aptbrtn, cs aptbsub, aptbsum, aptbtod, aptdtob, aptftob, aptltob, cs aptpfab, aptbcat. cs Tested in program GEOM, test problem basb.test. cs aptbase apt/src Subroutine for finding the value of a decimal floating cs point number in a specified number base. cs See aptchai, aptchia, apthexa, apthexd. cs aptbcat apt/src Subroutine for concatenating the digits of two cs nonzero big integers, stored as arrays of digits in a cs specified number base. cs See aptatob, aptbadd, aptbasb, aptbdiv, aptbexp, cs aptbfac, aptbmul, aptbpac, aptbpow, aptbrev, aptbrtn, cs aptbsub, aptbsum, aptbtod, aptdtob, aptftob, aptltob, cs aptpfab, aptbcat. cs Tested in program GEOM, test problem big.cat.test. cs aptbdiv apt/src Subroutine for dividing two big integers, stored as cs arrays of digits in a specified number base. cs See aptatob, aptbadd, aptbasb, aptbase, aptbexp, cs aptbfac, aptbmul, aptbpac, aptbpow, aptbrev, aptbrtn, cs aptbsub, aptbsum, aptbtod, aptdtob, aptftob, aptltob, cs aptpfab, aptbcat. cs Tested by apt/test/aptbdiv.GPS. cs aptbexp apt/src Subroutine for finding the exponential function of a cs big integer, stored as an array of digits in a cs specified number base. cs See aptatob, aptbadd, aptbasb, aptbdiv, aptbfac, cs aptbmul, aptbpac, aptbpow, aptbrev, aptbrtn, aptbsum, cs aptbsub, aptbtod, aptdtob, aptftob, aptltob, aptpfab. cs Tested by apt/test/aptbfac.GPS. cs aptbfac apt/src Subroutine for finding the factorial function of a cs big integer, stored as an array of digits in a cs specified number base. cs See aptatob, aptbadd, aptbasb, aptbdiv, aptbexp, cs aptbfac, aptbmul, aptbpac, aptbpow, aptbrev, aptbrtn, cs aptbsub, aptbsum, aptbtod, aptdtob, aptftob, aptltob, cs aptpfab, aptbcat. cs Tested by apt/test/aptbfac.GPS. cs aptbitb apt/src Subroutine for doing Boolean operations "comp", "not", cs "and" = "int", "nand", "or" = "un", "nor", "xor" and cs "xnor" = "eqv" on machine words. cs Tested by apt/test/aptbit(bfmrs).DEC. cs See aptbits. cs aptbite apt/src Subroutine for expanding the bits from machine words cs into a type integer*1 array. cs See aptbitm, aptbitp. cs Tested by apt/test/aptbite.DEC. cs aptbitf apt/src Subroutine for finding a specified bit string in cs a machine word. See aptchfp. cs Tested by apt/test/aptbit(bfmrs).DEC. cs aptbitm apt/src Subroutine for moving a bit string from any location in cs one word to any location in another word. cs See aptbite, aptbitp, aptbits. cs Tested by apt/test/aptbit(bfmrs).DEC. cs aptbitp apt/src Subroutine for contracting bits from a type integer*1 cs array into machine words. cs See aptbite, aptbitm. cs Tested by apt/test/aptbite.DEC. cs aptbitr apt/src Subroutine for inserting a random bit string into cs any position in a machine word. cs See aptchrn. cs Tested by apt/test/aptbit(bfmrs).DEC. cs aptbits apt/src Subroutine for shifting the bits in a word right or cs left, pulling in bits from another specified word. cs See aptbitb, aptbitm. cs Tested by apt/test/aptbit(bfmrs).DEC. cs aptblsq apt/src Subroutine for reducing multiple blanks to single cs blanks in a character string. cs See aptchsq, aptrmbl. cs Tested by apt/test/aptblsq.GPS. cs aptbmul apt/src Subroutine for multiplying two big integers, stored as cs arrays of digits in a specified number base. cs See aptatob, aptbadd, aptbasb, aptbdiv, aptbexp, cs aptbfac, aptbmul, aptbpac, aptbpow, aptbrev, aptbrtn, cs aptbsub, aptbsum, aptbtod, aptdtob, aptftob, aptltob, cs aptpfab, aptbcat. cs Tested by apt/test/aptbmul.GPS. cs aptbpac apt/src Subroutine for finding the number of permutations and cs combinations of M things taken N at a time, with cs M and N big integers in a specied number base. cs See aptatob, aptbadd, aptbasb, aptbdiv, aptbexp, cs aptbfac, aptbmul, aptbpac, aptbpow, aptbrev, aptbrtn, cs aptbsub, aptbsum, aptbtod, aptdtob, aptftob, aptltob, cs aptpfab, aptbcat. cs aptbpow apt/src Subroutine for finding a power of a big integer, stored cs as an array of digits in a specified number base. cs See aptatob, aptbadd, aptbasb, aptbdiv, aptbexp, cs aptbfac, aptbmul, aptbpac, aptbpow, aptbrev, aptbrtn, cs aptbsub, aptbsum, aptbtod, aptdtob, aptftob, aptltob, cs aptpfab, aptbcat. cs Tested by apt/test/aptbpow.GPS. cs aptbrev apt/src Subroutine for reversing the order of an integer array. cs See aptatob, aptbadd, aptbasb, aptbdiv, aptbexp, cs aptbfac, aptbmul, aptbpac, aptbpow, aptbrev, aptbrtn, cs aptbsub, aptbsum, aptbtod, aptdtob, aptftob, aptltob, cs aptpfab, aptbcat. cs Tested by apt/test/aptbpow.GPS. cs aptbrkn apt/src Subroutine for finding if a specified point is in a cs "brick", a volume element bounded by surfaces of the cs coordinate system, the fractional distances of the cs point across the brick, and the distances from the cs point to each of the six bounding surfaces. cs See aptbrkp, aptbrks, aptbrkv. cs Tested by apt/test/aptbrk?.SUN . cs aptbrkp apt/src Subroutine for finding a point in a "brick", a volume cs element bounded by surfaces of the coordinate system, cs given the fractional distances of the point across cs the brick. See aptbrkn, aptbrks, aptbrkv. cs Tested by apt/test/aptbrk?.SUN . cs aptbrks apt/src Subroutine for randomly sampling a point in a "brick", cs a volume element bounded by surfaces of the cs coordinate system, and returning the coordinates of cs the point, and the fractional distances of the point cs across the brick. See aptbrkn, aptbrkp, aptbrkv. cs Tested by apt/test/aptbrk?.SUN . cs aptbrkv apt/src Subroutine for finding data for a "brick", a volume cs element bounded by surfaces of the coordinate system, cs including minimum, centroid and maximum coordinates, cs face and centroid surface areas, and the volume. cs See aptbrkn, aptbrkp, aptbrks. cs Tested by apt/test/aptbrk?.SUN . cs aptbrtn apt/src Subroutine for finding a root of a big integer, stored cs as an array of digits in a specified number base. cs See aptatob, aptbadd, aptbasb, aptbdiv, aptbexp, cs aptbfac, aptbmul, aptbpac, aptbpow, aptbrev, aptbrtn, cs aptbsub, aptbsum, aptbtod, aptdtob, aptftob, aptltob, cs aptpfab, aptbcat. cs Tested by apt/test/aptbrtn.GPS. cs aptbsub apt/src Subroutine for subtracting two big integers, stored as cs arrays of digits in a specified number base. cs See aptatob, aptbadd, aptbasb, aptbdiv, aptbexp, cs aptbfac, aptbmul, aptbpac, aptbpow, aptbrev, aptbrtn, cs aptbsub, aptbsum, aptbtod, aptdtob, aptftob, aptltob, cs aptpfab, aptbcat. cs Tested by apt/test/aptbsub.GPS. cs aptbsum apt/src Subroutine for finding the number of occurrences of cs each digit in a big integer. cs See aptatob, aptbadd, aptbasb, aptbdiv, aptbexp, cs aptbfac, aptbmul, aptbpac, aptbpow, aptbrev, aptbrtn, cs aptbsub, aptbsum, aptbtod, aptdtob, aptftob, aptltob, cs aptpfab, aptbcat. cs Tested by apt/test/aptbsum.GPS. cs aptbtod apt/src Subroutine for translating from a big integer, stored cs as an array of digits in a specified number base, cs to a decimal integer, a decimal floating point cs number, and a base 10 logarithm. The inverse cs operations are done in aptdtob, aptftob and aptltob, cs respectively. cs See aptatob, aptbadd, aptbasb, aptbdiv, aptbexp, cs aptbfac, aptbmul, aptbpac, aptbpow, aptbrev, aptbrtn, cs aptbsub, aptbsum, aptbtod, aptdtob, aptftob, aptltob, cs aptpfab, aptbcat. cs Tested by apt/test/aptbtod.GPS. cs aptcang apt/src Subroutine for converting angle units from a specified cs unit to degrees, grads, radians, and to arc degrees, cs minutes and seconds. cs Tested by apt/test/aptcang.DEC. cs Tested in program GEOM, test problem ang.test. cs aptchai apt/src Subroutine for translating a character string from cs ASCII octal, decimal or hexadecimal integer to cs binary integer format. cs See aptbase, aptchap, aptchfp, aptchfs, aptchia, cs aptchin, aptchmv, aptchrn, aptchrp, aptchsq, aptchtp. cs Tested by craks in craklibe . cs aptchap apt/src Subroutine for separating a character string into cs delimited data fields, and converting the fields cs into character, integer, and floating-point words. cs The character words may be of any length, and the cs field delimiter may be any character. cs See aptchai, aptchfp, aptchfs, aptchia, aptchin, cs aptchmv, aptchrn, aptchrp, aptchsq, aptchtp, cs aptffip, aptfbrk, aptquot. cs Tested by apt/test/aptchap.A. csOBS aptchat apt/src Subroutine for separating a character string into cs delimited data fields, and converting the fields cs into character, integer, and floating-point words. cs The character words may not have more than eight cs characters. Any field delimiter character may be cs used. OBSOLETE. Use aptchap. cs See aptchai, aptchfp, aptchfs, aptchia, aptchin, cs aptchmv, aptchrn, aptchrp, aptchsq, aptchtp, cs aptffip. cs Tested by craks in craklibe . cs aptchfp apt/src Subroutine for finding a specified character string cs in another character string. cs See aptchai, aptchap, aptchfs, aptchia, aptchin, cs aptchmv, aptchrn, aptchrp, aptchsq, aptchtp, cs aptfbrk, aptquot. cs Tested by chars in charlibe . cs aptchfs apt/src Subroutine for finding a specified symbol (delimited cs character string) in another character string. cs See aptchapchai, apt, aptchfp, aptchia, aptchin, cs aptchip, aptchmv, aptchrn, aptchrp, aptchsq, aptchtp, cs aptfbrk, aptquot. cs Tested by chars in charlibe . cs aptchia apt/src Subroutine for translating an integer into ASCII cs octal, decimal or hexadecimal characters, and cs storing them in a character string. cs See aptbase, aptchai, aptchap, aptchfp, aptchfs, cs aptchin, aptchmv, aptchrn, aptchrp, aptchsq, aptchtp. cs Tested by chars in charlibe . cs aptchin apt/src Subroutine for incrementing or decrementing characters cs in a character string, including both numeric and cs alphabetic (lower and upper case) characters. cs See aptchai, aptchap, aptchfp, aptchfs, aptchia, cs aptchmv, aptchrn, aptchrp, aptchsq, aptchtp. cs Tested by apt/test/aptchin.SUN . cs aptchip apt/src Subroutine for finding non-graphic characters (nulls, cs control characters, and non-ASCII) characters in a cs character string, optionally returning their cs locations and types, and optionally replacing each cs type with a specified character. cs See aptchfs, aptchrp, aptchsw. cs Tested by apt/test/aptchip.A. cs aptchmv apt/src Subroutine for moving a character string from one cs character string to another, or within the same cs character string. cs See aptchai, aptchap, aptchfp, aptchfs, aptchia, cs aptchin, aptchrn, aptchrp, aptchsq, aptchtp. cs Tested by chars in charlibe . cs aptchrn apt/src Subroutine for replacing characters in a character cs string with random characters, from a specified set. cs See aptchai, aptchap, aptchfp, aptchfs, aptchia, cs aptchin, aptchmv, aptchrp, aptchsq, aptchtp. cs Tested by chars in charlibe . cs aptchrp apt/src Subroutine for replacing individual characters in cs a character string, based on a table of initial and cs replacement characters. Useful for right or left cs filling, incrementing file names, changing case. cs See aptchai, aptchap, aptchfp, aptchfs, aptchia, cs aptchip, aptchin, aptchmv, aptchrn, aptchsq, aptchtp. cs Tested by chars in charlibe . cs aptchsq apt/src Subroutine for squeezing a character out of a character cs string, and right-filling with blanks. cs See aptchai, aptchap, aptchfp, aptchfs, aptchia, cs aptchip, aptchin, aptchmv, aptchrn, aptchrp, aptchtp, cs aptrmbl. cs Tested by chars in charlibe . cs aptchtp apt/src Subroutine for translating a character string into cs character and/or integer and/or floating-point mode. cs Character words may be of any length. cs See aptchai, aptchap, aptchfp, aptchfs, aptchia, cs aptchin, aptchmv, aptchrn, aptchrp, aptchsq, aptsubs. cs Tested by apt/test/aptchtp.A. csOBS aptchty apt/src Subroutine for translating a character string into cs character and/or integer and/or floating-point mode. cs Character words may have up to 8 characters. cs OBSOLETE. Use aptchtp. cs See aptchai, aptchap, aptchfp, aptchfs, aptchia, cs aptchin, aptchmv, aptchrn, aptchrp, aptchsq, aptsubs. cs Tested by craks in craklibe . cs aptcinc apt/src Subroutine for finding the two points of intersection cs of two circles in a major plane, if any. cs Tested by twods in twodlibe . cs aptcirc apt/src Subroutine for finding the circle through three cs specified points in a major plane. Vectorized over a cs set of such cases. See aptcirk, aptcirp, aptcirt, cs aptsphk, aptsphl, aptspht, aptsphp. cs Tested by apt/test/aptcirc.SUN . cs aptcirk apt/src Subroutine for finding the radii and centers of two cs circles, each tangent to three specified tangent cs circles. See aptcirl, aptcirt, aptsphk, aptsphl, cs aptspht. cs aptcirl apt/src Subroutine for finding the center of a circle of cs specified radius, tangent to two specified tangent cs circles. See aptcirc, aptcirk, aptcirt, aptsphk, cs aptsphl, aptspht. cs Tested in program GEOM, test problem kiss.circ.test. cs aptcirp apt/src Subroutine for finding the circle through three cs specified points in 3-D space. Vectorized over a set cs of such cases. See aptcirc, aptcirk, aptcirt, cs aptsphk, aptsphl, aptspht, aptsphp, aptclis. cs Tested by apt/test/aptcirp.SUN . cs aptcirt apt/src Subroutine for finding the radii of two circles, each cs tangent to three tangent circles with specified cs radii. See aptcirc, aptcirk, aptcirp, aptsphk, cs aptsphl, aptspht. cs Tested in program GEOM, test problem kiss.circ.test. cs aptcivic apt/src Civic output from compiling all APT subroutines. cs aptclis apt/src Subroutine for finding the equation for a right cs circular cylinder with a specified axial point, cs axial direction, and radius. See aptcirp. cs Tested by apt/test/aptclis.SUN . cs aptcmad apt/src Subroutine for finding the greatest common divisor (GCD) cs and least common multiple (LCM) of a set of integers. cs Tested by apt/test/aptcmad.GPS . cs aptcnis apt/src Subroutine for finding the equation for a cone on cs a given major axis, and through two given points. cs Vectorized over a set of such cases. cs See aptaxis, aptcois, aptcyis, aptelis, aptesis, cs aptplis, aptrkis, aptrois, apttris. cs Tested by tsurs in tsurlibe . cs aptcniz apt/src Subroutine for finding the equation for a cone on cs the z axis, and through two given points. cs See aptaxis, aptcniz, aptcois, aptcyis, aptelis, cs aptesis, aptplis, aptrkis, aptrois, apttris. cs Tested by test/aptcniz.DEC cs aptcofr apt/src Subroutine for finding the coefficients of the continued cs fraction for a given value. See aptcofv, aptiris. cs Tested in program GEOM, test problem contfr.test. cs aptcofv apt/src Subroutine for finding the value of a continued cs fraction for given coefficients. See aptcofr, cs aptiris. cs Also finds the equivalent rational fraction. cs Tested in program GEOM, test problem contfr.test. cs aptcois apt/src Subroutine for finding the equation for a cone on cs a given major axis, with a given vertex angle and cs vertex coordinate. Vectorized over a set of cs such cases. cs See aptaxis, aptcnis, aptcyis, aptelis, aptesis, cs aptplis, aptrkis, aptrois, apttris. cs Tested by tsurs in tsurlibe . cs aptcomb apt/src Subroutine for finding all combinations of N things cs taken M at a time, for specified N and M. cs See aptperm. cs Tested by apt/test/aptcomb.SUN . cs aptcomf apt/src Subroutine for finding the number of combinations of cs N things taken M at a time, for specified N and M, cs in integer and floating point form. cs See aptcomb, aptperf, aptperm. cs Tested by apt/test/aptcomb.DEC. cs aptcomg apt/src Subroutine for finding the number of ways a group of cs items can be separated into a specified number of cs smaller groups with specified sizes. cs See aptcomf. cs Tested by apt/test/aptcomg.YANA cs aptconl apt/src Subroutine for finding the 1999 values of cs the fundamental physical and chemical constants, cs in cm-g-shake-keV units. See aptconm. cs Input is a list of indices, output a list of values. cs Tested by twuns in twunlibe . cs aptconm apt/src Subroutine for finding the 1999 values of cs the fundamental physical and chemical constants, cs in SI units (m-kg-s-K and eV). See aptconl. cs Input is a list of indices, output a list of values. cs Tested by twuns in twunlibe . cs aptcris apt/src Subroutine for finding the normal vector, and the most cs extreme radii of curvature, and their corresponding cs tangent unit vectors and centers of curvature, at a cs point on a family of quadric surfaces. cs See aptqnor. cs Tested by apt/test/aptcris.DEC. cs aprcrtr apt/src Subroutine for finding the remainders resulting from cs dividing a specified integer by a specified set cs of divisors. This is the inverse of the Chinese cs Remainder Theorem Problem. cs Tested by apt/test/aprcrtr.GPS . cs aptcrts apt/src Subroutine for finding the integer for which the cs remainders for a series of divisors are known. cs This is the Chinese Remainder Theorum Problem. cs Tested by apt/test/aprcrts.GPS . cs aptcsys apt/src Subroutine for transforming coordinates from one cs 3-D coordinate system (Cartesian, cylindrical, or cs spherical) to another. See aptcsyv. cs Tested by tsyss in tsyslibe . cs aptcsyv apt/src Subroutine for transforming coordinates and their cs associated bound vectors from one 3-D coordinate cs system (Cartesian, cylindrical, or spherical) to cs another. See aptcsys. cs Tested by tsyss in tsyslibe . cs aptcube apt/src Subroutine for generating a cube inscribed in a cs unit sphere. See aptdode, apticos, aptocta, apttetr. cs Tested by tpros in tprolibe . cs aptcubs apt/src Subroutine for finding the real and complex roots of cs a cubic equation. See aptqrts, aptqrtv, aptquar. cs Tested by apt/test/aptcubs.SUN . cs aptcump apt/src Subroutine for finding the cumulative PDF for a cs tabulated piecewise linear PDF. cs See aptcums, aptcumt. cs Tested by tapls in tapllibe . cs Tested by tpals in tpallibe . cs aptcums apt/src Subroutine for randomly sampling from a cumulative cs PDF, with an option for striating. cs See aptcump, aptcumt. cs Tested by tpals in tpallibe . cs aptcumt apt/src Subroutine for randomly sampling indices in a packed cs array of cumulative PDFs, where each sample may cs be from a different cumulative PDF. cs See aptcump, aptcums. cs Tested by tapls in tapllibe . cs Tested by tpals in tpallibe . cs aptcycy apt/src Subroutine for finding the distance between two cs circular cylinders, and related information. cs See aptplcy, aptplpl, aptplsp, aptspsp, aptspcy. cs Tested by apt/test/aptcycy.SUN . cs aptcyis apt/src Subroutine for finding the equation for a cylinder on cs a given major axis, with a given radius. cs Vectorized over a set of such cases. cs See aptaxis, aptcnis, aptcois, aptelis, aptesis, cs aptrkis, aptrois, apttris. cs Tested by tsurs in tsurlibe . cs aptdeld apt/src Subroutine for deleting lines (rows) from a table in cs which the values in specified fields (columns) are cs the same as in the preceding line, or the same as cs in any preceding lines. May be used for unsorted cs or sorted (much faster) tables. cs Tested by tsors in tsorlibe . cs aptdet3 apt/src Subroutine for finding the determinant of a 3x3 matrix. cs See aptrips, aptdet4. cs Tested by apt/test/aptdet3.GPS cs aptdet4 apt/src Subroutine for finding the determinant of a 4x4 matrix. cs See aptrips, aptdet3. cs Tested by apt/test/aptdet4.GPS cd aptdir . Directory of APT directories, libraries, files. cs aptdirt apt/src Subroutine for finding all unique directions, and their cs minimum distances, between two groups of points. cs See aptdist, aptprim. cs Tested by apt/test/aptdirt.GPS . cs aptdist apt/src Subroutine for finding the distance between two points, cs and the initial unit direction vector, in a cs Cartesian, cylindrical or spherical coordinate system cs in 1-D, 2-D, or 3-D. Vectorized over a set of such cs cases. See aptdirt. cs Tested by tmovs in tmovlibe . cs apt_doc apt/doc User document describing the APT Subroutine Library and cs related files. cs Directory apt/src has soft link to apt/doc. cs aptdode apt/src Subroutine for generating a dodecahedron inscribed in a cs unit sphere. See aptcube, apticos, aptocta, apttetr. cs aptdtob apt/src Subroutine for translating from a decimal integer to a cs big integer, stored as an array of digits in a cs specified number base. The inverse operation is done cs in aptbtod. cs See aptatob, aptbadd, aptbasb, aptbdiv, aptbexp, cs aptbfac, aptbmul, aptbpac, aptbpow, aptbrev, aptbrtn, cs aptbsub, aptbsum, aptbtod, aptdtob, aptftob, aptltob, cs aptpfab, aptbcat. cs Tested by apt/test/aptdtob.GPS. cs aptelis apt/src Subroutine for finding the equation for a quadric cs surface symmetric around a given major axis, with a cs given center, and passing through two given points. cs The surface may be an ellipsoid, a hyperboloid of two cs sheets, a pair of planes, a cylinder, or a cone. cs See aptaxis, aptcnis, aptcois, aptcyis, aptesis, cs aptplis, aptrkis, aptrois, apttris. cs Tested by tsurs in tsurlibe . cs apteqin apt/src Subroutine for finding the bin indices for a set of cs equal-probability bins corresponding to a piecewise cs linear PDF for discrete events (a histogram), or for cs a random variable, which may be continuous, or cs discontinuous. See apteqsb, apteqxn, apteqxs. cs Tested by tapls in tapllibe . cs Tested by tpals in tpallibe . cs apteqsb apt/src Subroutine for randomly sampling bin indices from an cs array of equally-probable bin indices. cs See apteqin, apteqxn, apteqxs. cs Tested by tapls in tapllibe . cs Tested by tpals in tpallibe . cs apteqxn apt/src Subroutine for finding the x boundaries of a set of cs equal-probability bins corresponding to a piecewise cs linear PDF for x. cs See apteqin, apteqsb, apteqxs. cs Tested by tpals in tpallibe . cs apteqxs apt/src Subroutine for randomly sampling x values from a set cs of equal-probability bins. cs See apteqin, apteqsb, apteqxn. cs Tested by tpals in tpallibe . cs aptesis apt/src Subroutine for finding the equation for an ellipsoid, cs given the three semiaxes on the major axes. cs Vectorized over a set of such cases. cs See aptaxis, aptcnis, aptcois, aptcyis, aptelis, cs aptplis, aptrkis, aptrois, apttris. cs Tested by tsurs in tsurlibe . cs aptetrl apt/src Subroutine for finding the local tetrahedral cs coordinates (vertex weights) for a set of points in cs tetrahedrons. Vectorized over a set of such cases. cs See aptetrn, aptetrp, aptetru, aptetrv, aptetrw. cs Tested by tetrs in tetrlibe . cs aptetrn apt/src Subroutine for finding the distances of a point from cs the triangular faces of a tetrahedron, the minimum of cs the distances, whether or not the point is in the cs tetrahedron, and optionally, the local tetrahedral cs coordinates (vertex weights) of the point. cs Vectorized over a set of such cases. cs See aptetrl, aptetrp, aptetru, aptetrv, aptetrw. cs Tested by tetrs in tetrlibe . cs aptetrp apt/src Subroutine for randomly sampling points in a cs tetrahedron. Vectorized over a set of such points. cs See aptlocd, aptlocs, aptlocy, aptqloc, apttloc, cs apttlod, aptetrl, aptetrn, aptetru, aptetrv, aptetrw. cs Tested by tetrs in tetrlibe . cs Tested by tsals in tsallibe . cs aptetru apt/src Subroutine for finding a unit vector at specified angles cs from two other vectors. cs See aptetrl, aptetrn, aptetrp, aptetrv, aptetrw. c* Tested by apt/test/aptetru.DEC. cs aptetrv apt/src Subroutine for finding a point at a specified distance cs from a specified point, such that the line between cs them makes specified angles with two other lines cs originating at the specified point. cs See aptetrl, aptetrn, aptetrp, aptetru, aptetrw. c* Tested by apt/test/aptetrv.DEC. cs aptetrw apt/src Subroutine for finding a point in a tetrahedron (or cs quadrangle), by interpolation using the local cs coordinates (vertex weights). Vectorized over a cs set of such cases. cs See aptetrl, aptetrn, aptetrp, aptetru, aptetrv. cs Tested by tetrs in tetrlibe . cs aptexpl apt/src Subroutine for randomly sampling from one or more cs exponential PDFs, in a specified range. cs See aptexps. cs Tested by apt/test/aptexpl.SUN . cs aptexps apt/src Subroutine for randomly sampling from one or more cs exponential PDFs, from zero to infinity. cs See aptexpl. cs Tested by apt/test/aptexps.SUN, cs aptfbrk apt/src Subroutine for finding a character string delimited by cs a pair of specified delimiters in a specified cs character string, with a specified escape character. cs See aptchap, aptchfp, aptchfs, aptffip, aptquot. cs Tested by apt/test/aptfbrk.DEC . cs aptfdad apt/src Subroutine for adjusting the value of a variable cs relative to a unit interval. See aptfdav. cs aptfdav apt/src Subroutine for adjusting the value of a table of cs variables, relative to a unit interval. See aptfdad. cs Tested by trids in tridlibe . cs aptfdqc apt/src Subroutine for finding the fractional distances of a cs point between the two pairs of opposite edges of a cs quadrangle in a major plane. Vectorized over a set cs of such cases. See aptqfdc, aptquad. cs Tested by twods in twodlibe . cs aptffip apt/src Subroutine for reading free-field input from an I/O cs unit, and cracking it into ASCII, integer, and cs floating-point fields. The ASCII fields may be of cs any length, and any field delimiter may be used. cs See aptchap, aptchfp, aptchfs, aptfbrk, aptquot. cs Tested by apt/test/aptffip.A. cs aptfact apt/src Subroutine for finding the factorial function of an cs integer, in integer and floating point form. cs Tested by apt/test/aptcomp.DEC. cs aptflibe apt/src TAR Library of ANSI Standard FORTRAN source files of cs the All-Particle-Tracking subroutines. cs aptftob apt/src Subroutine for converting a floating point number into cs an array of digits in a specified number base. cs The inverse operation is done in aptbtod. cs See aptatob, aptbadd, aptbasb, aptbdiv, aptbexp, cs aptbfac, aptbmul, aptbpac, aptbpow, aptbrev, aptbrtn, cs aptbsub, aptbsum, aptbtod, aptdtob, aptftob, aptltob, cs aptpfab, aptbcat. cs Tested by apt/test/aptftod.GPS. cs aptgrat apt/src Subroutine for finding the ratio of a geometric series, cs given the first term, the number of terms, and the cs sum of the terms. cs Tested by apt/test/aptgrat.SUN . cs apthexa apt/src Subroutine for translating a decimal number into a cs hexadecimal string. See aptbase, apthexd, aptchai, cs aptchia. cs Tested by apt/test/apthexa.DEC. cs apthexd apt/src Subroutine for translating a hexadecimal string into a cs decimal number. See aptbase, apthexa, aptchai, cs aptchia. cs Tested by apt/test/apthexd.DEC. cs apticos apt/src Subroutine for generating a icosahedron inscribed in a cs unit sphere. See aptcube, aptdode, aptocta, apttetr. cs aptil08 apt/src Subroutine for tiling the surface of a unit sphere with cs triangles, starting with 8, with each additional cs level having four times as many. cs See aptil12, aptil20. cs aptil12 apt/src Subroutine for tiling the surface of a unit sphere with cs triangles, starting with 60, with each additional cs level having four times as many. cs See aptil08, aptil20. cs aptil20 apt/src Subroutine for tiling the surface of a unit sphere with cs triangles, starting with 20, with each additional cs level having four times as many. cs See aptil08, aptil12. cs aptintp apt/src Subroutine for interpolating or extrapolating in the uv cs plane, given two points and a u coordinate, with cs options to use linear-linear, linear-log, log-linear cs or log-log interpolation or extrapolation. cs See aptlook. cs Tested by apt/test/aptintp.SUN . cs aptintq apt/src Subroutine for finding the proximal points or cs intersection between two quadric surfaces, with an cs initial guess. cs See aptripq. cs Tested by apt/test/aptintq.DEC. cs aptinvc apt/src Subroutine for inverting a set of coordinates or cs vectors through a point, all in a major plane. cs Vectorized. cs See aptrot..., aptscll, aptsclr, aptinvp, aptref..., cs apttran. cs aptinvp apt/src Subroutine for inverting a set of coordinates or cs vectors through a point in 3-D space. Vectorized. cs See aptrois, aptrot..., aptscll, aptsclr, aptinvc, cs aptref..., apttran. cs Tested by tinvs in tinvlibe . cs aptiris apt/src Subroutine for finding the integer plus reciprocal cs integer series for a decimal number. cs See aptcofr, aptcofv. cs Tested by apt/test/aptiris.DEC. cs aptlnic apt/src Subroutine for finding the intersection between a line cs and a circle in a major plane. Vectorized over a set cs of such cases. See aptplsp. cs Tested by twods in twodlibe . cs aptlnlc apt/src Subroutine for finding the intersection, if any, cs between two given lines in a major plane, and finding cs if the given lines are parallel or coincident. cs Vectorized over a set of such cases. See aptlnln. cs Tested by twods in twodlibe . cs aptlnln apt/src Subroutine for finding the line of minimum length cs connecting two given lines in 3-D space, and finding cs if the given lines are parallel or coincident. cs Vectorized over a set of such cases. cs See aptcycy, aptlnlc, aptlnpl, aptplcy. cs Tested by trids in tridlibe . cs Tested by wdiss in wdislibe . cs aptlnpl apt/src Subroutine for finding the intersection of a line with cs a plane, and finding if the line is parallel to the cs plane, and if so, if it is in the plane. cs Vectorized over a set of such cases. cs See aptlntr, aptplcy, aptplsp, aptplpl, aptptln, cs aptptpl, aptrklc, aptrkpl, apttrip. cs Tested by trids in tridlibe . cs aptlntr apt/src Subroutine for finding the intersection of a line with cs a plane, and finding if the line is parallel to the cs plane, and if so, if it is in the plane. cs Vectorized over a set of such cases. cs See aptlnpl, aptrklc, aptrkpl, aptptpl, apttrip. cs Tested by trids in tridlibe . cs aptltob apt/src Subroutine for converting the log of a floating point cs number into an array of digits in a specified number cs base. The inverse operation is done in aptbtod. cs See aptatob, aptbadd, aptbasb, aptbdiv, aptbexp, cs aptbfac, aptbmul, aptbpac, aptbpow, aptbrev, aptbrtn, cs aptbsub, aptbsum, aptbtod, aptdtob, aptftob, aptltob, cs aptpfab, aptbcat. cs Tested by apt/test/aptltod.GPS. cs aptlocd apt/src Subroutine for randomly sampling points on an annulus cs of a circular disk. Vectorized over a set of such cs points. cs See aptetrp, apscnss, apscnsy, aptqloc, aptscns, cs aptscnv, apttloc, apttlod. cs Tested by tsals in tsallibe . cs aptlocs apt/src Subroutine for randomly sampling points in a spherical cs shell. Vectorized over a set of such points. cs See aptetrp, aptlocd, aptlocy, aptqloc, apttloc, cs apttlod. cs Tested by tsals in tsallibe . cs aptlocy apt/src Subroutine for randomly sampling points in a right cs circular cylindrical shell. Vectorized over a set cs of such points. cs See aptetrp, apscnsd, apscnss, aptqloc, aptscns, cs aptscnv, apttloc, apttlod. cs Tested by tsals in tsallibe . cs aptlook apt/src Subroutine for table look-up, with any table interval, cs and with table values ascending or descending. cs Uses a binary search method. cs See aptintp. cs Tested by ttabs in ttablibe . cs aptmaxw apt/src Subroutine for randomly sampling a particle velocity cs from a relativistic Maxwellian PDF, for each of a cs set of specified temperatures. cs Tested by tsams in tsamlibe . cs aptmean apt/src Subroutine for finding the mean value and standard cs deviation from the mean, for an array of scalar cs values. cs aptmnlg apt/src Subroutine for finding the values and indices of the] cs log-scale maximum and minimum in a floating-point cs array, restricted to positive values, with the cs minimum no less than a specified number of decimal cs decades below the maximum. cs See aptmnmx. cs Tested by apt/test/aptmnlg.SUN . cs aptmnmx apt/src Subroutine for finding the values and indices of the cs maximum and minimum in a floating-point array. cs See aptmnlg. cs Tested by apt/test/aptmnmx.SUN . cs aptmopv apt/src Subroutine for operating on a set of 3-D vectors with a cs 3 by 3 matrix operator, preceded and followed by a cs translation of the origin. The matrix operator may cs be produced by any of the subroutines aptinv, cs aptrot..., aptscll, aptsclr, aptrefs, to do cs inversion, rotation, scaling, or reflection. cs Vectorized. cs See aptrois. cs Tested by tinvs in tinvlibe . cs Tested by tpros in tprolibe . cs Tested by trefs in treflibe . cs Tested by trots in trotlibe . cs aptmord apt/src Subroutine for finding the order and multiplicative cs inverse of an integer i in arithmetic modulo n, when cs i and n have no common factors other than 1. cs See aptpfac, aptprim, aptcmad. cs Tested in test/aptmord.GPS. cs aptmove apt/src Subroutine for moving a point a specified distance in cs a specified direction, in a Cartesian, cylindrical or cs spherical coordinate system, in 1-D, 2-D, or 3-D. cs Vectorized over a set of such cases. cs See aptmovs, aptmvcy. cs Tested by tmovs in tmovlibe . cs aptmovs apt/src Subroutine for moving a point a specified distance in cs a specified direction, in a spherical coordinate cs system, in 1-D, 2-D, or 3-D. cs Vectorized over a set of such cases. cs See aptmove, aptmvcy. cs Tested by tmovs in tmovlibe . cs aptmprd apt/src Subroutine for finding the matrix product of two cs square matrices. The matrix operators may cs be produced by any of the subroutines aptinv, cs aptrot..., aptscll, aptsclr, aptrefs, to do cs inversion, rotation, scaling, or reflection. cs Tested by tinvs in tinvlibe . cs Tested by trefs in treflibe . cs aptmvcy apt/src Subroutine for moving a point a specified distance in cs a specified direction, in a cylindrical coordinate cs system, in 1-D, 2-D, or 3-D. An axisymmetric option cs is included. Vectorized over a set of such cases. cs See aptmove, aptmovs. cs Tested by tmovs in tmovlibe . cs aptnerr apt/src Subroutine for writing an error message to specified cs IOC units, with an option for either returning or cs exiting, with or without leaving the drop file. cs Tested in ttars in ttarlibe . cs aptnewt apt/src Subroutine for finding a root xroot of the polynomial cs equation in x, P(x) = SUM {a(n)*x**n}, (n = 0, np), cs with an initial guess of xinit, a search range from cs xmin to xmax, allowing no more then nitmax Newtonian cs iterations, and a relative precision of tol. cs See aptqrts, aptqrtv, aptcubs, aptquar, aptpole, cs aptpolf, aptpolr. cs Tested by apt/test/aptnewt.DEC. cs aptnint apt/src Subroutine for rounding off a number to an integer cs multiple of a specified factor, if within a specified cs distance, which may be absolute and/or relative. cs See aptrnds. cs Tested by apt/test/aptnint.DEC. cs aptnorm apt/src Subroutine for randomly sampling values from a normal cs PDF (PDF) with a given cs mean value and a given standard deviation. cs All samples may be from one PDF, or each sample may cs be from its own PDF. cs Tested by tsams in tsamlibe . cs aptocta apt/src Subroutine for generating a octahedron inscribed in a cs unit sphere. See aptcube, aptdode, apticos, apttetr. cs aptparb apt/src Subroutine for finding the coordinates, the velocity, cs and the path length on the parabolic trajectory of a cs uniformly accelerated particle, given the initial cs position and velocity, the constant acceleration, cs and the time. cs See aptparh, aptparl, aptparp, aptparq, aptpars, cs aptpart, aptparx, aptacct. cs Tested in program GEOM, test problem accel.test. cs aptparh apt/src Subroutine for finding the initial velocity, the cs coordinates, the velocity, the path length, and the cs time, on the parabolic trajectory of a uniformly cs accelerated particle, given the initial position and cs speed (not the velocity), and the constant cs acceleration, at any intersection points with a cs specified point possible by varying the initial cs velocity without changing the initial speed. cs See aptparb, aptparl, aptparp, aptparq, aptpars, cs aptpart, aptparx, aptacct. cc Tested in program GEOM, test problem accel.pt.test. cs aptparl apt/src Subroutine for finding the coordinates, the velocity, cs the path length, and the time, on the parabolic cs trajectory of a uniformly accelerated particle, cs given the initial position and velocity, and the cs constant acceleration, at any intersection or cs proximal points with a line, given the end points of cs the line. cs For a proximal point, the distance to the line and cs the proximal point on the line are also found. cs See aptparb, aptparh, aptparp, aptparq, aptpars, cs aptpart, aptparx, aptacct. cs Tested in program GEOM, test problem accel.ln.test. cs aptparp apt/src Subroutine for finding the coordinates, the velocity, cs the path length, and the time, on the parabolic cs trajectory of a uniformly accelerated particle, cs given the initial position and velocity, and the cs constant acceleration, at any intersection or cs proximal points with a plane, given a point on the cs plane and its normal vector. cs For a proximal point, the distance to the plane and cs the proximal point on the plane are also found. cs See aptparb, aptparh, aptparl, aptparq, aptpars, cs aptpart, aptparx, aptacct. cs Tested in program GEOM, test problem accel.pl.test. cs aptparq apt/src Subroutine for finding the coordinates, the velocity, cs the path length, and the time, on the parabolic cs trajectory of a uniformly accelerated particle, cs given the initial position and velocity, and the cs constant acceleration, at any intersection points cs with a quadric surface, given the coefficients of cs the implicit equation of the quadric surface. cs See aptparb, aptparh, aptparl, aptparp, aptpars, cs aptpart, aptparx, aptacct. cc Tested in program GEOM, test problems cs aptpars apt/src Subroutine for finding the coordinates, the velocity, cs the path length, and the time, on the parabolic cs trajectory of a uniformly accelerated particle, cs given the initial position and velocity, and the cs constant acceleration, at any intersection or cs proximal points with a specified point. cs See aptparb, aptparh, aptparl, aptparp, aptparq, cs aptpart, aptparx, aptacct. cc Tested in program GEOM, test problem accel.pt.test. cs aptpart apt/src Subroutine for finding the initial position and cs velocity, and the constant acceleration, of the cs parabolic trajectory of a uniformly accelerated cs particle, given from one to three points and times. cs See aptparb, aptparh, aptparl,aptparp, aptparq, cs aptpars, aptparx, aptacct. cc Tested in program GEOM, test problem accel.fit.test. cs aptparx apt/src Subroutine for finding the coordinates, the velocity, cs the path length, and the time, on the parabolic cs trajectory of a uniformly accelerated particle, cs given the initial position and velocity, and the cs constant acceleration, at any extrema of the implicit cs equation of a quadric surface, given the coefficients cs of the implicit equation of the quadric surface. cs See aptparb, aptparh, aptparl, aptparp, aptparq, cs aptpars, aptpart, aptacct. cc Tested in program GEOM, test problems cs aptpblc apt/src Subroutine for finding the line which perpendicularly cs bisects the line between two points in a major plane. cs Vectorized over a set of such cases. cs Tested by twods in twodlibe . cs aptpbln apt/src Subroutine for finding the plane which perpendicularly cs bisects the line between two points in 3-D space. cs Vectorized over a set of such cases. cs Tested by trids in tridlibe . cs aptpent apt/src Subroutine for subdividing a pentagonal face of a cs regular dodecahedron inscribed in a unit sphere, into cs 5 triangles, with all vertices on the unit sphere. cs See aptdode. cs aptperc apt/src Subroutine for projecting points in a major plane onto cs a line, as seen from a view point. Produces a 1-D cs perspective view of a 2-D scene. cs See aptpers, aptprcy, aptproc, aptprop, cs aptpros, aptprsp, aptradv. cs Tested by tpros in tprolibe . cs aptperf apt/src Subroutine for finding the number of permutations of cs N things taken M at a time, for specified N and M, cs in integer and floating point form. cs See aptcomb, aptcomf, aptperm. cs Tested by apt/test/aptcomb.DEC. cs aptperm apt/src Subroutine for finding all permutations of N things cs taken M at a time, for specified N and M. cs See aptcomb. cs Tested by apt/test/aptperm.SUN . cs aptpers apt/src Subroutine for projecting points onto a specified cs plane, as seen from a view point, with a specified cs horizon. Produces a 2-D perspective view of a 3-D cs scene. cs See aptperc, aptprcy, aptproc, aptprop, cs aptpros, aptprsp, aptqper, aptradv. cs Tested by tpros in tprolibe . cs aptpfab apt/src Subroutine for finding all prime factors of a big cs integer, without storing any other prime numbers, cs aptprim. cs See aptatob, aptbadd, aptbasb, aptbdiv, aptbexp, cs aptbfac, aptbmul, aptbpac, aptbpow, aptbrev, aptbrtn, cs aptbsub, aptbsum, aptbtod, aptdtob, aptftob, aptltob, cs aptpfab, aptbcat. cs Tested by apt/test/aptpfab.GPS . cs aptpfac apt/src Subroutine for finding all prime factors of an integer, cs without storing any other prime numbers, and the cs Euler's totient function for arithmetic modulo the cs integer. See aptafac, aptcmad, aptmord, aptpfft, cs aptprim. cs Tested by apt/test/aptpfac.GPS . cs aptpfft apt/src Subroutine for finding the prime factors of the cs factorial function of an integer. cs See aptpfac, aptprim. cs Tested by apt/test/aptpfft.GPS . cs aptpfit apt/src Subroutine for finding the implicit quadric surface cs equation for a plane through three specified points, cs the distance of the plane from the origin, and the cs unit vector normal to the plane. See aptvpln. cs Tested in program GEOM, test problem pl.fit.test. cs aptplcy apt/src Subroutine for finding the intersection and/or distance cs and proximal lines of a plane and a circular cs cylinder. cs See aptcycy, aptlnpl, aptplpl, aptplqu, aptplsp, cs aptptpl, aptspcy, aptspsp. cs Tested by apt/test/aptplcy.SUN . cs aptplis apt/src Subroutine for finding the intersection of a specified cs major plane with a quadric surface. Vectorized over cs a set of quadric surfaces. cs See aptaxis, aptcnis, aptcois, aptcyis, aptelis, cs aptesis, aptplqu, aptrkis, aptrois, apttris. cs Tested by tsurs in tsurlibe . cs aptplpl apt/src Subroutine for finding the line of intersection of two cs specified planes, and finding the distance between cs parallel planes. cs Vectorized over a set of such cases. cs See aptlnpl, aptplcy, aptplqu, aptplsp, aptptpl, cs aptspsp, aptspcy, aptcycy. cs Tested by trids in tridlibe . cs aptplqu apt/src Subroutine for finding the distances from a plane to cs a quadric surface, and any intersection between them. cs Finds the center point of the quadric, and any cs proximal points on the plane and the quadric surface, cs their coordinates, and the vectors and distances cs between them. Finds the type and characteristics of cs any point or curve of intersection between the plane cs and the quadric surface. Finds the cylindrical cs quadric surface perpendicular to the plane and cs through the curve of intersection. cs See aptplcy, aptplis, aptplpl, aptplsp. cs Tested by apt/test/aptplqu.SUN . cs aptplsp apt/src Subroutine for finding the distance from a point to a cs plane, the coordinates of the proximal point on the cs plane, and the radius of the circle of intersection cs of the plane and a sphere centered on the point. cs Vectorized over a set of such cases. See aptlnic. cs See aptcycy, aptlnpl, aptplcy, aptplpl, aptplqu, cs aptptpl, aptspcy, aptspsp. cs Tested by trids in tridlibe . cs aptpolc apt/src Subroutine for finding the vertices, the radii of the cs inscribed and circumscribed circles, the edge length, cs and the area of a regular polygon in a major plane, cs when the number of sides and the coordinates of the cs center and one vertex are specified. See aptpoly. cs Tested by tpols in tpollibe . cs aptpole apt/src Subroutine for finding the value of a polynomial cs equation and its 1st and 2nd derivatives for a set cs of arguments. See aptnewt, aptpolf, aptpolr. cs Tested by aptpole.DEC. cs aptpolf apt/src Subroutine for factoring a real root out of a cs polynomial equation, reducing its order by 1. cs See aptnewt, aptpole, aptpolr. cs Tested by aptpolf.DEC. cs aptpolr apt/src Subroutine for finding the real roots, extrema and cs inflection points of a polynomial equation cs See aptnewt, aptpole, aptpolf. cs Tested by apt/test/aptpolr.DEC. cs aptpoly apt/src Subroutine for finding the vertices, the radii of the cs inscribed and circumscribed circles, the edge length, cs and the area of a regular polygon in 3-D xyz space, cs when the number of sides and the coordinates of the cs center, one vertex, and another point in the plane cs of the polygon are specified. See aptpolc. cs Tested by tpols in tpollibe . cs aptprcy apt/src Subroutine for projecting a set of points onto a cs cylindrical surface in 3-D xyz space, with cs several options. cs See aptperc, aptpers, aptproc, aptprop, cs aptpros, aptprsp, aptqper, aptradv. cs Tested by tpros in tprolibe . cs aptprim apt/src Subroutine for finding prime numbers and the irreducible cs proportion geometric factors associated with them, cs for use in estimating the number of distinct cs directions in 2-D, 3-D and n-D regular arrays in cs space, and for use in crystallography and in the cs study of symmetry sets. cs See aptdirt, aptmord, aptpfft, aptpfac. cs Tested by apt/test/aptprim.GPS . cs aptproc apt/src Subroutine from projecting a set of points onto a cs circle in a major plane. cs See aptperc, aptpers, aptprcy, aptprop, cs aptpros, aptprsp, aptradv. cs Tested by tpros in tprolibe . cs aptprop apt/src Subroutine for projecting a set of points cs perpendicularly onto a plane in 3-D xyz space. cs See aptperc, aptpers, aptprcy, aptproc, cs aptpros, aptprsp, aptradv. cs Tested by tpros in tprolibe . cs aptpros apt/src Subroutine from projecting a set of points onto a cs sphere in 3-D xyz space. cs See aptperc, aptpers, aptprcy, aptproc, aptprop, cs aptprsp, aptqper, aptradv. cs Tested by tpros in tprolibe . cs aptprsp apt/src Subroutine for projecting a set of points onto a cs spherical surface in 3-D xyz space, with cs several options. cs See aptperc, aptpers, aptprcy, aptproc, aptprop, cs aptpros, aptradv. cs Tested by tpros in tprolibe . cs aptptlc apt/src Subroutine for finding the distance from a point to a cs line segment, all in a major plane, and optionally, cs the fractional distance of the proximal point along cs the line segment. Vectorized over a set of such cs cases. See aptptln. cs Tested by twods in twodlibe . cs aptptln apt/src Subroutine for finding the distance from a point to a cs line segment in 3-D space, the proximal point on cs the line segment, and the fractional distance of that cs point along the line segment. Vectorized over a set cs of such cases. cs See aptcycy, aptlnpl, aptplcy, aptplsp,aptptlc, cs aptptpl, aptspcy, aptspsp. cs Tested by trids in tridlibe . cs aptptpl apt/src Subroutine for finding the distance from a point to a cs plane, and the coordinates of the proximal point on cs the plane. Vectorized over a set of such cases. cs See aptcycy, aptlnpl, aptplcy, aptplpl, aptplsp, cs aptquad, aptrklc, aptrkpl, aptspcy, aptspsp, apttrip, cs aptqval, aptwhis. cs Tested by trids in tridlibe . cs aptqdic apt/src Subroutine for finding the distances from a point to cs the four sides of a quadrangle in a major plane. cs Vectorized over a set of such cases. cs See aptqinc, apttinc. cs Tested by twins in twinlibe . cs aptqexc apt/src Subroutine for finding any extreme points in a quadric cs curve in a major plane. See aptqext, aptqupt. cs Tested by apt/test/aptqexc.SUN . cs aptqext apt/src Subroutine for finding any x, y and z extreme points cs in a quadric surface, and the surface type and cs center of symmetry. See aptaxis, aptqexc, aptqupt. cs Tested by apt/test/aptqext.SUN . cs aptqexv apt/src Subroutine for finding any extreme points in a quadric cs surface, in a specified direction. cs See aptaxis, aptqexc, aptqext, aptqupt. cs Tested by apt/test/aptqexv.SUN . cs aptqfdc apt/src Subroutine for finding the fractional distances of a cs point between the two pairs of opposite edges of a cs quadrangle in a major plane. Vectorized over a set cs of such points. See aptfdqc, aptquad. cs Tested by twods in twodlibe . cs aptqfit apt/src Subroutine for finding any unique quadric surface cs through nine points. See aptqhyp. cs Tested in program GEOM, command "quadric". cs aptqhyp apt/src Subroutine for finding the hyperbolic paraboloid or cs plane through the four vertices, four sides and cs center of a quadrangle. See aptqfit. cs Tested in program GEOM, command "hyperb". cs aptqinc apt/src Subroutine for finding if a point is inside of a cs quadrangle in a major plane, and the minimum cs distances to the four sides. Vectorized over a set cs of such cases. See aptqdic, apttinc. cs Tested by twins in twinlibe . cs aptqloc apt/src Subroutine for sampling points from a uniform PDF cs over a triangle or a planar quadrangle, in a major cs plane. Vectorized over the coordinates. cs See aptetrp, aptlocd, aptlocs, aptlocy, apttloc, cs apttlod. cs Tested by tsals in tsallibe . cs aptqnor apt/src Subroutine for finding the normal vector and tangent cs plane at a specified point, for a specified family cs of quadric surfaces. See aptcris. cs Tested by apt/test/aptqnor.DEC. cs aptqper apt/src Subroutine for finding the quadric surface on which cs two specified families of quadric surfaces are cs orthogonal. May be used for finding the quadrid cs surface through the edge of q quadric surface, as cs projected onto a plane, a cylinder, or a sphere. cs Tested by apt/test/aptqper.DEC and in test program cs aptqprr apt/src Subroutine for finding the nearest point on a quadric cs surface to a specified point, using a specified cs direction, certain special directions, and direction cs vectors randomly sampled from isotropic and cs cosine-power distributions. cs OBSOLETE. Use only if subroutine aptwhis fails. cs See aptqprt, aptquad, aptqval, aptwhis. cs Tested by apt/test/aptqprr.SUN . cs aptqprt apt/src Subroutine for finding the nearest point on a quadric cs surface to a specified point, using a specified cs direction, certain special directions, and then using cs a iterative method of steepest ascent, combining a cs tangent plane method and a center of curvature cs method. cs OBSOLETE. Use only if subroutine aptwhis fails. cs See aptqprr, aptquad, aptqval, aptwhis. cs Tested by apt/test/aptqprt.SUN . cs aptqrts apt/src Subroutine for finding the real or complex roots of a cs quadratic equation. Any coefficients may be zero. cs See aptqrtv, aptcubs, aptquar. cs aptqrtv apt/src Subroutine for finding the real or complex roots of a cs quadratic equation. Any coefficients may be zero. cs Vectorized over a set of such cases. cs See aptqrts, aptcubs, aptquar. cs aptquad apt/src Subroutine for finding the minimum distance from a cs point to a (possibly nonplanar) surface bounded by cs a quadrangle in 3-D space, the coordinates of the cs near point on the surface, and the fractional cs distances of the near point between opposite sides. cs See aptfdqc, aptlnpl, aptptpl, aptrklc, aptrkpl, cs apttrip, aptwhis, aptqprr, aptqprt, aptqval. cs Tested by dquads in dquadlib. cs aptquar apt/src Subroutine for finding the real and complex roots of a cs quartic polynomial equation. cs See aptqrts, aptqrtv, aptcubs. cs Tested in program GEOM, command "roots" in test cs problems root.test, root4.test, roots.test. cs aptquot apt/src Subroutine for finding a character string delimited by cs a specified character within a specified character cs string, with paired delimiters within the string cs ignored as delimiters and reduced to a single cs character in the result. cs See aptchap, aptchfp, aptchfs, aptffip, aptfbrk. cs Tested by apt/test/aptquot.DEC . cs aptqupr apt/src Subroutine for finding the cylindrical quadric surface cs corresponding to the projection of a specified cs quadric surface in a specified direction. cs See aptplqu. cs Tested by apt/test/aptqupr.SUN . cs aptqupt apt/src Subroutine for finding any extreme points of a quadric cs surface, and any intercepts of the quadric surface on cs the major axes or the symmetry axes of the quadric. cs See aptqexc, aptquxt, aptqexv. cs Tested by apt/test/aptqupt.SUN . cs aptquwt apt/src Subroutine for interpolating a point in a quadrangle, cs given the fractional distances between opposite pairs cs sides. Vectorized over a set of such cases. cs See aptfdqc, aptqfdc, aptetru, aptetrv, aptetrw. cs Tested by trids in tridlibe . cs aptqvac apt/src Subroutine for finding the shapes and sizes of a set of cs quadrangles in a major plane. Optional output cs includes the areas of the vertices, the number and cs location of any concave (negative area) vertices, and cs any bowtie intersection points. cs Possible shapes include convex quadrangles, cs boomerangs and bowties, each in positive and negative cs forms. Vectorized over the quadrangles. cs Tested by twods in twodlibe . cs aptqval apt/src Subroutine for finding the value of a quadric surface cs function at a specified point. cs Tested by apt/test/aptqval.DEC. cs aptrabc apt/src Subroutine for finding all straight lines that cut a cs triangle into two sections with equal areas and cs equal perimeters, given the lengths of the three cs edges of the triangle. cs See aptrcab, aptrcut, aptrext, aptrich. cs Tested in program GEOM, test problem cute.test. cs aptradv apt/src Subroutine for making a geometric view factor cs projection of a set of points. cs See aptperc, aptpers, aptprcy, aptproc, aptprop, cs aptpros, aptprsp. cs Tested by tpros in tprolibe . cs aptrand apt/src Subroutine for randomizing the order of an array. cs Tested by tsams in tsamlibe . cs Tested by tapls in tapllibe . cs aptrans apt/src Subroutine for randomly sampling a set of values from cs an array, without replacement (each sample has a cs unique initial array index). cs Tested by tsams in tsamlibe . cs Tested by tapls in tapllibe . cs aptrcab apt/src Subroutine for finding any straight lines cutting two cs specified edges of a triangle, that cut the cs triangle into two sections with equal areas and cs equal perimeters, given the lengths of the three cs edges of the triangle. cs See aptrabc, aptrcut, aptrext, aptrich. cs Tested in program GEOM, test problem cute.test. cs aptrcut apt/src Subroutine for finding all straight lines that cut a cs triangle into two sections with equal areas and cs equal perimeters, given the vertex coordinates. cs See aptrabc, aptrcab, aptrext, aptrich. cs Tested in program GEOM, test problem cuts.test. cs aptrefc apt/src Subroutine for spectral reflection of a 2-D direction cs vector from a line, all in a major plane. cs See aptrefl, aptrefs. cs Tested by trefs in treflibe . cs aptrext apt/src Subroutine for finding all extended triangles formed by cs extending any two edges of a triangle, so that the cs added section has the same perimeter and area as the cs original triangle, given the three edge lengths of cs the original triangle. cs See aptrabc, aptrcab, aptrcut, aptrich. cs Tested in program GEOM, test problem cute.test. cs aptrefl apt/src Subroutine for spectral reflection of a 3-D direction cs vector from a surface perpendicular to a major plane. cs See aptrefc, aptrefs. cs Tested by trefs in treflibe . cs aptrefq apt/src Subroutine for analyzing a reflection matrix operator, cs to find the orientation of the reflection plane. cs See aptrefc, aptrefs. cs Tested by trefs in treflibe . cs aptrefs apt/src Subroutine for finding the matrix operator for spectral cs reflection from a specified plane in 3-D space, and cs to do the reflection on a set of spatial points or cs vectors. Vectorized. See aptmopv, aptrefl, aptrefq. cs Tested by trefs in treflibe . cs aptrfps apt/src Subroutine for randomly sampling a floating-point value cs from a specified range of values. cs Vector version is aptrfpt. cs Tested by tsaps in tsaplibe . cs aptrfpt apt/src Subroutine for randomly sampling floating-point values cs from a specified range of values, with any degree of cs striation. Vectorized over sampled integers. cs Scalar version is aptrfps. cs Tested by tsaps in tsaplibe . cs aptrich apt/src Subroutine for finding if three specified edge lengths cs can be used to form a real triangle. cs See aptrabc, aptrcab, aptrcut, aptrext. cs Tested in program GEOM, test problems cute.test, cs aptrins apt/src Subroutine for randomly sampling an integer from a cs sequence of integers. cs Vector version is aptrint. cs Tested by tsaps in tsaplibe . cs aptrint apt/src Subroutine for randomly sampling integers from a cs sequence of integers, with any degree of striation. cs Vectorized over sampled integers. cs Scalar version is aptrins. cs Tested by tsaps in tsaplibe . cs aptripc apt/src Subroutine for finding the local triangular coordinates cs of a point in or near a triangle in a major plane. cs Vectorized over a set of such cases. cs See aptqloc, aptripl, apttloc, apttlod, apttrig, cs apttrip. cs Tested by twods in twodlibe . cs aptripl apt/src Subroutine for finding the local triangular coordinates cs of a point near a triangle in 3-D xyz space, and the cs nearest point in the plane of the triangle. cs Vectorized over a set of such cases. cs See aptqloc, aptripc, apttloc, apttlod, apttrip. cs Tested by trids in tridlibe . cs aptripp apt/src Subroutine for finding the equilateral triangle that cs projects onto a triangle with specified vertices. cs See aptripr. cs Tested by apt/test/aptripp.DEC. cs aptripq apt/src Subroutine for finding a triple point of intersection cs of three quadric surfaces, nearest a specified point, cs if one exists. cs See aptintq. cs Tested by apt/test/aptripq.DEC cs aptripr apt/src Subroutine for finding the equilateral triangle that cs projects onto a triangle with specified edges. cs See aptripp. cs Tested by apt/test/aptripr.DEC. cs aptrips apt/src Subroutine for finding the scalar triple product of cs three vectors. Vectorized over a set of such cases. cs Equal to the volume of a parallelopiped for which cs the three vectors are the edge vectors. cs Zero if the three vectors are coplanar. cs See aptdet3, aptdet4. cs Tested by apt/test/aptrips.SUN . cs aptript apt/src Subroutine for finding the distance from a triangle to cs a point in 3-D xyz space. Vectorized over a set of cs such cases. See aptripl, apttrip. cs aptripv apt/src Subroutine for finding the vector triple product of cs three vectors. Vectorized over a set of such cases. cs Tested by apt/test/aptripv.SUN . cs Tested by trids in tridlibe . cs aptrkcl apt/src Subroutine for finding the intersection of a linear cs 3-D track, from a given point with a given direction, cs with a cylindrical axisymmetric surface of constant cs radius. 1-D cylindrical geometry. cs Vectorized over a set of such cases. cs See aptrkis, aptrklc, aptrkpl, aptrkrl, aptrksl. cs Tested by twuns in twunlibe . cs aptrkcy apt/src Subroutine for finding the intersection of a linear cs 3-D track, from a given point with a given direction, cs with a cylindrical axisymmetric surface. cs 2-D cylindrical geometry. cs Vectorized over a set of such cases. cs See aptrkcl, aptrkis, aptrklc, aptrkpl, aptrkrl, cs aptrksl. cs Tested by trids in tridlibe . cs aptrkis apt/src Subroutine for finding the intersection of a linear cs 3-D track, from a given point with a given direction, cs with a general quadric surface in 3-D xyz space, cs specified by an implicit equation f(x,y,z) = 0, and cs finding the normal vector at the intersection and the cs angle between the track and the normal vector. cs Vectorized over a set of such cases. cs See aptrkcl, aptrkcy, aptrklc, aptrkpl, aptrkrl, cs aptrksl. cs See aptaxis, aptcnis, aptcois, aptcyis, aptelis, cs aptesis, aptplis, aptrois, apttris. cs Tested by tsurs in tsurlibe . cs aptrklc apt/src Subroutine for finding the intersection of a linear cs 2-D track, from a given point with a given direction, cs with a line, both in a major plane, and finding if cs the track and the line are parallel. cs 2-D planar geometry. cs Vectorized over a set of such cases. cs See aptlnpl, aptptpl, apttrip, aptrkcl, aptrkcy, cs aptrkis, aptrkpl, aptrkrl, aptrksl. cs Tested by twods in twodlibe . cs aptrkpl apt/src Subroutine for finding the intersection of a linear cs 3-D track, from a given point with a given direction, cs with a plane, and finding if the track is parallel cs to the plane, and if so, if it is in the plane. cs 3-D geometry. Vectorized over a set of such cases. cs See aptlnpl, aptlntr, aptptpl, apttrip, aptrkcl, cs aptrkcy, aptrkis, aptrklc, aptrkrl, aptrksl. cs Tested by trids in tridlibe . cs aptrkrl apt/src Subroutine for finding the intersection of a linear cs 3-D track, from a given point with a given direction, cs with a spherical surface of constant radius. cs 1-D spherical geometry. cs Vectorized over a set of such cases. cs See aptrkcl, aptrkis, aptrklc, aptrkpl, aptrksl. cs Tested by twuns in twunlibe . cs aptrksl apt/src Subroutine for finding the intersection of a linear cs 3-D track, from a given point in a given direction, cs with a vw plane in uvw space. 1-D slab geometry. cs Vectorized over a set of such cases. cs See aptrkcl, aptrkcy, aptrkis, aptrklc, aptrkpl, cs aptrkrl, apttrip. cs Tested by twuns in twunlibe . cs aptrloc apt/src Subroutine for interpolating a point in a triangle in cs a major plane, given the vertex weights. Vectorized cs over a set of such cases. cs See aptripl, aptrlop, apttrip. cs Tested by twods in twodlibe . cs aptrlop apt/src Subroutine for interpolating a point in a triangle in cs 3-D xyz space, given the vertex weights. Vectorized cs over a set of such cases. cs See aptripl, aptrloc, apttrip. cs Tested by trids in tridlibe . cs aptrmbl apt/src Subroutine for removing leading and/or trailing blanks cs from a character string. See aptchsq. c* Tested by apt/test/aptrmbl.DEC. cs aptrnds apt/src Subroutine for rounding off a value, either to a cs relative or absolute precision. See aptnint. cs Tested by twuns in twunlibe . cs aptrois apt/src Subroutine for finding the new coefficients of an cs implicit equation for a general quadric surface, cs resulting from any combination of reflection, cs rotation, inversion and scaling. cs See aptinvp, aptmopv, aptrefc, aptrefl, aptrefq, cs aptrefs, aptrota, aptrotc, aptrotp, aptrotq, aptrots, cs aptrott, aptrotv, aptscll, aptsclr, aptsclu. cs See aptaxis, aptcnis, aptcois, aptcyis, aptelis, cs aptesis, aptplis, aptrkis, apttris. cs Tested by tsurs in tsurlibe . cs aptrota apt/src Subroutine for finding the matrix operator for rotation cs by a specified angle around a specified axis in 3-D cs space. See aptmopv, aptrois, aptrotp, aptrotq, cs aptrots, aptrott, aptrotv, aptrotc, aptwirl, aptwist. cs Tested by tsurs in tsurlibe . cs Tested by trots in trotlibe . cs aptrotc apt/src Subroutine for rotating a set of vectors in a major cs plane, by the angle between two specified vectors in cs that plane. See aptrot... cs Tested by twods in twodlibe . cs aptrotp apt/src Subroutine for finding the matrix operator for rotating cs a specified plane to be parallel to another plane, cs around an axis parallel to the line of intersection. cs See aptmopv, aptrois, aptrota, aptrotq, aptrots, cs aptrott, aptrotv, aptrotc. cs Tested by trots in trotlibe . cs aptrotq apt/src Subroutine for analyzing a rotation matrix operator, cs to find the equivalent angle and axis of rotation, cs and the equivalent sequential angles of rotation cs around the x, y, and z axes. cs See aptmopv, aptrois, aptrota, aptrotp, aptrots, cs aptrott, aptrotv, aptrotc. cs Tested by tsurs in tsurlibe . cs Tested by tinvs in tinvlibe . cs Tested by trefs in treflibe . cs Tested by trots in trotlibe . cs aptrots apt/src Subroutine for finding the matrix operator for rotating cs sequentially around the three axes of the Cartesian cs coordinate system, in a specified sequence, by cs specified angles. cs See aptmopv, aptrois, aptrota, aptrotp, aptrotq, cs aptrott, aptrotv, aptrotc. cs Tested by trots in trotlibe . cs aptrott apt/src Subroutine for finding the matrix operator for rotating cs a specified plane to be parallel to another specifed cs plane, with a specified vector in the first plane cs parallel to a specified vector in the second plane. cs See aptmopv, aptrois, aptrota, aptrotp, aptrotq, cs aptrots, aptrotv, aptrotc. cs Tested by tsurs in tsurlibe . cs Tested by tpros in tprolibe . cs Tested by trots in trotlibe . cs aptrotv apt/src Subroutine for finding the matrix operator for rotating cs a vector to be parallel to another vector, around the cs axis perpendicular to both, in 3-D space. cs See aptmopv, aptrois, aptrota, aptrotp, aptrotq, cs aptrots, aptrott, aptrotc. cs Tested by tsurs in tsurlibe . cs Tested by trots in trotlibe . cs Tested by trovs in trovlibe . cs aptscad apt/src Subroutine for randomly sampling unit vectors from a cs uniform PDF in a specified plane in 3-D space. cs See aptscan, aptscap, aptscar, aptscat, aptscaz, cs aptsciz. cs Tested by tdirs in tdirlibe . cs aptscan apt/src Subroutine for randomly sampling unit vectors from a cs uniform PDF at a specified angle from a specified cs direction in 3-D space. Vectorized over a set of cs such random unit vectors. Scalar version is aptscaz. cs See aptscad, aptscap, aptscar, aptscat, aptscaz, cs aptsciz, aptscma, aptscmz. cs Tested by tdirs in tdirlibe . cs Tested by tscns in tscanlib. cs Tested by trovs in trovlibe . cs aptscap apt/src Subroutine for randomly sampling unit vectors from a cs cosine**power PDF around a specified axis in cs 3-D space. Vectorized over output vectors. cs See aptscad, aptscan, aptscar, aptscat, aptscaz, cs aptsciz, aptscma, aptscmz. cs Tested by tdirs in tdirlibe . cs aptscar apt/src Subroutine for randomly sampling unit vectors from a cs uniform or cosine**power PDF around a specified cs axis in 3-D space, within a specified range of angles cs from that axis. cs See aptscad, aptscan, aptscap, aptscat, aptscaz, cs aptsciz, aptscma, aptscmz. cs Tested by tscns in tscanlib. cs aptscat apt/src Subroutine for randomly sampling unit vectors from a cs uniform PDF in 3-D space. Vectorized over a set of cs such random unit vectors. Scalar version is aptsciz. cs See aptscad, aptscan, aptscap, aptscar, aptscaz, cs aptsciz, aptscma, aptscmz. cs Tested by tdirs in tdirlibe . cs Tested by trids in tridlibe . cs Tested by wdiss in wdislibe . cs aptscav apt/src Subroutine for randomly sampling unit vectors from cs cosine**power PDFs around specified axes in cs 3-D space (one sampled vector per axis). cs See aptscad, aptscan, aptscar, aptscat, aptscaz, cs aptsciz, aptscma, aptscmz. cs Tested by tdirs in tdirlibe . cs aptscaz apt/src Subroutine for randomly sampling unit vectors from a cs uniform PDF at a specified angle from a specified cs direction in 3-D space. Scalar version. cs Vectorized version is aptscan. cs See aptscad, aptscan, aptscap, aptscar, aptscat, cs aptsciz, aptscma, aptscmz. cs Tested by trovs in trovlibe, ttars in ttarlibe . cs aptsciz apt/src Subroutine for randomly sampling unit vectors from a cs uniform PDF in 3-D space. Scalar version. cs Vectorized version is aptscat. cs See aptscad, aptscan, aptscap, aptscar, aptscat, cs aptscaz, aptscma, aptscmz. cs Tested by trovs in trovlibe, ttars in ttarlibe . cs aptsclc apt/src Subroutine for doing a linear scaling operation on a cs set of spatial points or vectors in a major plane, cs relative to a specified fixed point, and in a cs specified direction. This is the spatial part of a cs 2-D Lorentz transformation. Vectorized. cs See aptscll, aptsclr, aptsclu. cs aptscll apt/src Subroutine for finding the matrix operator for linear cs scaling in a specified direction in 3-D space, and cs doing the scaling on a set of spatial points or cs vectors, relative to a specified fixed point. This cs is the spatial part of a 3-D Lorentz transformation. cs Vectorized. See aptmopv, aptrois, aptsclc, aptsclt, cs aptsclu. cs Tested by trefs in treflibe . cs aptsclr apt/src Subroutine for finding the matrix operator for cs cylindrical scaling perpendicular to a specified axis cs in 3-D space, and doing the scaling on a set of cs spatial points or vectors, relative to a specified cs fixed point. cs Vectorized. See aptmopv, aptrois, aptsclc, aptscll, cs aptsclu. cs Tested by apt/test/aptsclr.SUN . cs aptsclu apt/src Subroutine for finding the matrix operator for uniform cs scaling in 3-D space, and doing the scaling on a set cs of spatial points or vectors, relative to a specified cs fixed point. Vectorized. cs See aptmopv, aptrois, aptsclc, aptscll, aptsclr. cs Tested by trids in tridlibe . cs aptscma apt/src Subroutine for randomly sampling unit vectors from a cs uniform PDF at a specified angle from a major axis cs in 3-D space. Vectorized over a set of such random cs unit vectors. Scalar version is aptscmz. cs See aptscad, aptscan, aptscap, aptscar, aptscaz, cs aptsciz, aptscmz. cs Tested by tscns in tscanlib. cs aptscmz apt/src Subroutine for randomly sampling unit vectors from a cs uniform PDF at a specified angle from a major axis cs in 3-D space. Vectorized version is aptscma. cs See aptscad, aptscan, aptscap, aptscar, aptscaz, cs aptsciz, aptscma. cs Tested by tttars in ttarlibe . cs aptscns apt/src Subroutine for randomly sampling points on the curved cs surface of a frustrum of a right circular cylinder. cs Vectorized over a set of such points. cs See aptlocd, aptlocy, aptscnv. cs Tested by tsals in tsallibe . cs aptscnv apt/src Subroutine for randomly sampling points in a frustrum cs of a circular cylindrical shell. cs Vectorized over a set of such points. cs See aptlocd, aptlocy, aptscns. cs Tested by tsals in tsallibe . cs aptslid apt/src Subroutine for randomly sampling one or more values cs from a linear PDF. cs Vectorized over the sampled values. Does not sample cs from regions of non-positive probability. cs See aptsliv. cs Tested by tsams in tsamlibe . cs aptsliv apt/src Subroutine for randomly sampling one value from each cs of one or more PDFs. Vectorized over the cs Vectorized over the PDFs. Does not cs sample from regions of non-positive probability. cs See aptslid. cs Tested by tsams in tsamlibe . cs aptsolv apt/src Subroutine for solving a set of linear algebraic cs equations by Gauss-Jordan elimination with partial cs pivoting. Finds solution, residuals. cs Tested by apt/test/aptsolv.SUN . cs aptsorm apt/src Subroutine for multiple-column sorting of a table with cs two or more columns, in any mode or direction. cs See aptsort. cs Tested by tsors in tsorlibe . cs aptsort apt/src Subroutine for single-column sorting of a table with cs two or more columns, in any mode or direction. cs See aptsorm. cs Tested by tsors in tsorlibe . cs aptspar apt/src Subroutine for randomly sampling points in a cs parallelopiped. Vectorized over a set of such cs points. cs Tested by tsaps in tsaplibe . cs aptspcy apt/src Subroutine for finding the distance between a sphere cs and a circular cylinder, and related information. cs See aptplcy, aptplpl, aptplsp, aptspsp, aptcycy. cs Tested by apt/test/aptspcy.SUN . cs aptspha apt/src Subroutine for finding the sphere centered on a cs specified axis, and passing through two points in cs 3-D space. Vectorized over a set of such cases. cs See aptcirc, aptcirk, aptcirp, aptsphk, aptsphl, cs aptsphp, aptspht. cs Tested by apt/test/aptspha.SUN . cs aptsphk apt/src Subroutine for finding the radii and centers of two cs spheres, each tangent to four specified tangent cs spheres. See aptcirk, aptcirl, aptcirt, aptsphl, cs aptspht. cs aptsphl apt/src Subroutine for finding the center of a sphere of cs specified radius, tangent to three specified tangent cs spheres. See aptcirc, aptcirk, aptcirl, aptcirt, cs aptsphk, aptspht. cs Tested in program GEOM, test problem kiss.sph.test. cs aptsphp apt/src Subroutine for finding the sphere passing through four cs points in 3-D space. Vectorized over a set of such cs cases. See aptcirc, aptcirk, aptcirp, aptspha, cs aptsphk, aptspht. cs Tested by apt/test/aptsphp.SUN . cs aptspht apt/src Subroutine for finding the radii of two spheres, each cs tangent to four tangent spheres with specified cs radii. See aptcirk, aptcirl, aptcirt, aptsphk, cs aptsphl. cs Tested in program GEOM, test problem kiss.sph.test. cs aptspod apt/src Subroutine for randomly sampling values of x from a cs specified interval, with a power-law PDF. cs Vectorized over a set of such values. cs Tested by tsams in tsamlibe . cs aptspsp apt/src Subroutine for finding the center and radius of the cs circle of intersection of two spheres, and the vector cs normal to the plane of the circle. Vectorized over cs a set of such cases. cs See aptplcy, aptplpl, aptplsp, aptspcy, aptcycy. cs Tested by trids in tridlibe . cs aptsuba apt/src Subroutine for combining a stem or variable name and cs an ASCII subscript into a single character string, cs with the subscript bracketed by parentheses. cs See aptsubb, aptsubr, aptsubs, aptsubm. cs Tested by apt/test/aptsuba.GPS. cs aptsubb apt/src Subroutine for combining a stem or variable name and cs ASCII subscripts into a single character string. cs See aptsuba, aptsubr, aptsubs, aptsubm. cs Tested by apt/test/aptsubb.GPS. cs aptsubm apt/src Subroutine for translating a character string into a cs stem and multiple subscripts, and translating the cs subscripts into integer and/or floating point mode, cs if possible. cs See aptchap, aptchtp, aptsuba, aptsubb, aptsubr, cs aptsubs. cs Tested by apt/test/aptsubm.GPS. cs aptsubr apt/src Subroutine for translating a character string into a cs stem and a subscript. cs See aptsuba, aptsubb, aptsubs, aptsubm. cs Tested by apt/test/aptsubr.DEC. cs aptsubs apt/src Subroutine for translating a character string into a cs stem and a subscript, and translating the subscript cs into integer and/or floating point mode, if possible. cs See aptchap, aptchtp, aptsuba, aptsubb, aptsubr, cs aptsubm. cs Tested by apt/test/aptsubs.DEC. cs aptsudo apt/src Subroutine for solving a Sudoku puzzle. cs See aptsudp, aptsudu, aptsudx. cs Tested by apt/test/aptsudo.GPS. cs aptsudu apt/src Subroutine for finding any duplicate characters in cs a row, column or box in a Sudoku puzzle. cs See aptsudo, aptsudp, aptsudx. cs Tested by apt/test/aptsudu.GPS. cs aptsudx apt/src Subroutine for doing bookkeeping for solving a Sudoku cs puzzle. See aptsudo, aptsudp, aptsudu. cs Tested by apt/test/aptsudx.GPS. cs aptsver apt/src Subroutine for finding the Steiner vertex of a cs triangle, its distances from the triangle vertices, cs and the relative vertex weights. cs Tested in program GEOM, test problem stein.test. cs apttetd apt/src Subroutine for finding the volume and center of gravity cs of a tetrahedron in xyz space. Vectorized over a set cs of such cases. cs Tested by trids in tridlibe . cs apttetr apt/src Subroutine for generating a tetrhedron inscribed in a cs unit sphere. See aptcube, aptdode, apticos, aptocta. cs apttinc apt/src Subroutine for finding if a point is inside a triangle cs in a major plane, and the minimum distances to the cs three sides. Vectorized over a set of such cases. cs See aptqdic, aptqinc. cs Tested by twins in twinlibe . cs apttloc apt/src Subroutine for randomly sampling points from a uniform cs PDF over a triangle in a major plane (2-D). cs Vectorized over the coordinates. cs See aptetrp, aptlocd, aptlocs, aptlocy, aptqloc, cs apttlod. cs Tested by tsals in tsallibe . cs apttlod apt/src Subroutine for randomly sampling points from a uniform cs PDF over a triangle in 3-D space. cs Vectorized over the coordinates. cs See aptetrp, aptlocd, aptlocs, aptlocy, aptqloc, cs apttloc. cs Tested by apt/test/apttlod.DEC cs apttrac apt/src Subroutine for translating the origin to a specified cs point in a major plane. cs See aptinv, aptrot..., aptscll, aptsclr, aptref..., cs apttran. cs apttran apt/src Subroutine for translating the origin to a specified cs point in 3-D space. cs See aptinv, aptrot..., aptscll, aptsclr, aptref..., cs apttrac. cs Tested by trans in tranlibe . cs apttric apt/src Subroutine for finding the edge lengths, areas, and cs centers of gravity of a set of triangles in a major cs plane (2-D). See apttrid, apttrig. cs Tested by twods in twodlibe . cs apttrid apt/src Subroutine for finding the edge lengths, areas, and cs centers of gravity of a set of triangles in 3-D cs space. See apttric, apttrig. cs Tested by trids in tridlibe . cs apttrig apt/src Subroutine for finding geometric data for a triangle cs in 3-D space, including edge lengths, angles, cs normal vector, the vectors for medians, angle cs bisectors, perpendicular bisectors, and altitudes and cs their lengths and intersections, including the cs centers and radii of the inscribed and circumscribed cs circles, the centroid and the orthocenter. cs See apttric, apttrid. cs Tested by apt/test/apttrig.SUN . cs apttrip apt/src Subroutine for finding the distance from a point to cs a triangular surface in 3-D space, the coordinates of cs the near point on the surface, and the fractional cs distances of the near point along the altitudes of cs the triangle. Options allow moving the near point cs onto the triangle if it is outside. cs See aptptpl, aptlnpl, aptripc, aptript, aptrkpl. cs Tested by dtrips in dtriplib. cs Tested by trids in tridlibe . cs apttris apt/src Subroutine for finding the new coefficients of an cs implicit equation for a general quadric surface, cs resulting from translating the origin. cs See aptaxis, aptcnis, aptcois, aptcyis, aptelis, cs aptesis, aptplis, aptrkis, aptrois, apttran. cs Tested by tsurs in tsurlibe . cs aptvadc apt/src Subroutine for finding a linear combination of the cs form d(n) = a(n) + s * b(n) * c(n), for a pair of cs vectors "a" and "c", and its magnitude, when "a" cs and "c" are in a major plane. cs Vectorized over a set of such cases, cs with "s" constant. See aptvadd, aptvdic, aptvdis, cs aptvsuc, aptvsum. cs aptvadd apt/src Subroutine for finding a linear combination of the cs form d(n) = a(n) + s * b(n) * c(n), for a pair of cs 3-D vectors "a" and "c", and its magnitude. cs Vectorized over a set of such cases, with "s" cs constant. See aptvadc, aptvdic, aptvdis, aptvsuc, cs aptvsum. cs aptvanc apt/src Subroutine for finding the cosine and sine of the angle cs between a pair of vectors in a major plane. cs Vectorized over a set of such cases. See aptvang. cs Tested by twods in twodlibe . cs aptvang apt/src Subroutine for finding the cosine of the angle between cs a pair of vectors in 3-D space. Vectorized over a cs set of such cases. See aptvanc. cs Tested by trids in tridlibe . cs Tested by wdiss in wdislibe . cs aptvaxb apt/src Subroutine for finding the vector (cross) product of cs a pair of 3-D vectors, and its magnitude. cs A magnitude less than the estimated error in its cs calculation is reduced to zero, indicating that the cs vectors are parallel or antiparallel. Vectorized cs over a set of such cases. cs See aptvaxc, aptvxuc, aptvxun. cs aptvaxc apt/src Subroutine for finding the vector (cross) product of cs a pair of vectors in a major plane. A magnitude cs less than the estimated error in its calculation is cs reduced to zero, indicating that the vectors are cs parallel or antiparallel. Vectorized over a set of cs such cases. See aptvaxb, aptvxuc, aptvxun. cs aptvcvc apt/src Subroutine for finding the component of one vector in cs the direction of another vector in a major plane. cs Vectorized over a set of such cases. See aptvplp. cs Tested by twods in twodlibe . cs aptvdic apt/src Subroutine for finding the distance vector between two cs points in a major plane. A magnitude less than the cs estimated error in its calculation is reduced to cs zero, indicating that the pair of points are cs coincident. Vectorized over a set of such cases. cs See aptvdil, aptvdis, aptvsuc, aptvsum. cs aptvdil apt/src Subroutine for finding the distance between two cs points on a major axis. A magnitude less than the cs estimated error in its calculation is reduced to cs zero, indicating that the pair of points are cs coincident. Vectorized over a set of such cases. cs See aptvdic, aptvdis, aptvsuc, aptvsum. cs aptvdis apt/src Subroutine for finding the vector difference of a pair cs of 3-D spatial coordinates or vectors. A magnitude cs less than the estimated error in its calculation is cs reduced to zero, indicating that the pair of points cs are coincident. Vectorized over a set of such cases. cs See aptvadc, aptvadd, aptvdic, aptvdil, aptvsuc, cs aptvsum. cs Tested by trids in tridlibe . cs aptvdoc apt/src Subroutine for finding the scalar (dot) product of cs a pair of 2-D vectors. A magnitude less than the cs estimated error in its calculation is reduced to cs zero, indicating that the pair is perpendicular. cs Vectorized over a set of vector pairs. cs See aptvdos, aptvdot. cs Tested by tbav in tbavlibe . cs aptvdos apt/src Subroutine for finding the scalar (dot) product of cs a pair of 3-D vectors. A magnitude less than the cs estimated error in its calculation is reduced to cs zero, indicating that the pair is perpendicular. cs Vectorized over a set of the second vectors. cs See aptvdoc, aptvdot. cs aptvdot apt/src Subroutine for finding the scalar (dot) product of cs a pair of 3-D vectors. A magnitude less than the cs estimated error in its calculation is reduced to cs zero, indicating that the pair is perpendicular. cs Vectorized over a set of vector pairs. cs See aptvdoc, aptvdos. cs Tested by tbav in tbavlibe . cs aptvlic apt/src Subroutine for imposing lower limits on the magnitudes cs of the components of a 2-D vector, while retaining cs the magnitude of the vector. cs aptvlim apt/src Subroutine for imposing lower limits on the magnitudes cs of the components of a 3-D vector, while retaining cs the initial magnitude of the vector. cs aptvplc apt/src Subroutine for finding the vector perpendicular to cs a line, both in a major plane. A magnitude less than cs the estimated error in its calculation is reduced to cs zero, indicating that the line length is zero. cs Vectorized over a set of such cases. See aptvpln. cs Tested by twods in twodlibe . cs aptvpap apt/src Subroutine for finding the components of a vector cs parallel to and perpendicular to another vector. cs Vectorized over a set of suce cases. cs See aptvcvc. cs Tested by apt/test/aptvpap.970418.tar. cs aptvpln apt/src Subroutine for finding the normal vector of a plane cs specified by three spatial points. A magnitude less cs than the estimated error in its calculation is cs reduced to zero, indicating that the three points are cs congruent or colinear, so do not specify a plane. cs Vectorized over a set of such cases. cs See aptpfit, aptvplc. cs Tested by trids in tridlibe . cs aptvplp apt/src Subroutine for finding the projection of a vector on a cs plane. Vectorized over a set of such cases. cs See aptvcvc. cs Tested by trids in tridlibe . cs aptvsuc apt/src Subroutine for finding the weighted sum of two 2-D cs vectors. Vectorized over a set of such cases. cs See aptvdil, aptvdic, aptvdis, aptvadc, aptvadd, cs aptvsum. cs Tested by twods in twodlibe . cs aptvsum apt/src Subroutine for finding the weighted sum of two 3-D cs vectors. Vectorized over a set of such cases. cs See aptvdil, aptvdic, aptvdis, aptvadc, aptvadd, cs aptvsuc. cs Tested by trids in tridlibe . cs aptvtoc apt/src Subroutine for adjusting the values of the components cs of a 2-D vector, by either truncating small values to cs zero, or increasing small values to a larger value, cs with several options. Vectorized over a set of such cs cases. See aptvtol. cs aptvtol apt/src Subroutine for adjusting the values of the components cs of a 3-D vector, by either truncating small values to cs zero, or increasing small values to a larger value, cs with several options. Vectorized over a set of such cs cases. See aptvtoc. cs Tested by trids in tridlibe . cs aptvuac apt/src Subroutine for finding the magnitude of a 2-D vector cs and replacing the vector with its corresponding unit cs vector. An initial component less than a specified cs minimum is reduced to zero. If the initial magnitude cs is zero, the result is zero. Vectorized over a set cs of such cases. See aptvubc, aptvuna, aptvunb, cs aptvunz, aptvusz. cs aptvubc apt/src Subroutine for finding the magnitude of a 2-D vector cs and finding the corresponding unit vector, when both cs are in a major plane. An initial component less than cs a specified minimum is reduced to zero. If the cs initial magnitude is zero, the result is zero. cs Vectorized over a set of such cases. cs See aptvuna, aptvunb, aptvunz, aptvusz. cs aptvuna apt/src Subroutine for finding the magnitude of a 3-D vector cs and replacing the vector with its corresponding unit cs vector. An initial component less than a specified cs minimum is reduced to zero. If the initial magnitude cs is zero, the result is zero. Vectorized over a set cs of such cases, See aptvuac, aptvubc, aptvunb, cs aptvunz, aptvusz. cs aptvunb apt/src Subroutine for finding the magnitude of a 3-D vector cs and finding the corresponding unit vector. An initial cs component less than a specified minimum is reduced cs to zero. If the initial magnitude is zero, the cs result is zero. Vectorized over a set of such cases. cs See aptvuac, aptvubc, aptvuna, aptvunz, aptvusz. cs Tested by twods in twodlibe . cs aptvunz apt/src Subroutine for finding the magnitude of a 3-D vector cs and replacing the vector with its corresponding unit cs vector. An initial component less than a specified cs minimum is reduced to zero. If the initial magnitude cs is zero, the result is zero. Scalar version. cs Vectorized version is aptvuna. cs See aptvuac, aptvubc, aptvuna, aptvunb, aptvusz. cs Tested by ttars in ttarlibe . cs aptvusz apt/src Subroutine for finding the magnitude of a 3-D vector cs and finding the corresponding unit vector. An initial cs component less than a specified minimum is reduced cs to zero. If the initial magnitude is zero, the cs result is zero. Scalar version. cs Vectorized version is aptvunb. cs See aptvuac, aptvubc, aptvuna, aptvunz, aptvusz. cs Tested by ttars in ttarlibe . cs aptvxuc apt/src Subroutine for finding the magnitude of the vector cs (cross) product of a pair of vectors in a major cs plane, and the corresponding unit vector parallel cs to the vector product, which is perpendicular to the cs plane. A magnitude less than the estimated error in cs its calculation is reduced to zero, indicating that cs the vectors are parallel or antiparallel, in which cs case no unit vector is returned. cs Vectorized over a set of such cases. cs See aptvaxb, aptvaxc, aptvxuc. cs aptvxun apt/src Subroutine for finding the magnitudes of the vector cs (cross) product of a pair of 3-D vectors, and the cs corresponding unit vector parallel to the vector cs product. A magnitude less than the estimated error cs in its calculation is reduced to zero, indicating cs that the vectors are parallel or antiparallel, cs in which case no unit vector is returned. cs Vectorized over a set of such cases. cs See aptvaxb, aptvaxc, aptvxuc. cs aptwhis apt/src Subroutine for finding the side, proximal point(s) and cs distance from a point to a quadric surface. cs See aptaxis, aptqprr, aptqprt, aptquad, aptqval. cs Tested by apt/test/aptwhis.SUN . cs Tested in program GEOM, commands "distance", cs "proximal", "side". cs aptwirl apt/src Subroutine for twisting points around an axis, with the cs angle of rotation depending on the radius of the cs point from the axis. See aptwist. cs Tested by apt/test/aptwirl.SUN . cs aptwist apt/src Subroutine for twisting points around an axis, with the cs angle of rotation depending on the axial coordinate cs of the point. See aptwirl. cs Tested by apt/test/aptwist.SUN . cs aptword apt/src Subroutine for testing words to see if they are between cs two specified limits, in any mode (alphanumeric, cs integer, or floating point). cs Tested by twors in tworlibe . cs aptxnup apt/src Subroutine for randomly sampling frequencies from cs Planck or Wien spectra at specified temperatures. cs Vectorized over temperatures and frequencies. cs Tested by tsams in tsamlibe . cx ar open Command to create, update, extract from or list a cx binary library. Used to make and maintain libapt.a . cx Usage (if module is blank, all files): cx ar rcv libapt.a module (create, replace module) cx ar rv libapt.a module (replace module) cx ar xv libapt.a module (extract module) cx ar tv libapt.a module (list module) cd bin edwards Directory for executable codes. cx deld bin Utility routine for reducing a table by removing cx rows which duplicate the values in another row, cx in specified columns. Reduces a one-column table cx or list to a set of unique values. See aptdeld. cg DESCRIPTION Description or definition of ITEM. cg FLAG apt_base Category of ITEM: cg cb A bld library of binary files. cg cd Directory. cg cg General information. cg cl Library of text files. cg cn File. cg cs Subroutine. cg cx Executable code. cx GEOM work General geometric code. Uses many APT subroutines. cg ITEM apt_base Item to be described or defined. cd lib edwards Directory containing apt binary library libapt.a . cd On Open GPS Cluster: ~edwards/work/lib cd libapt.a lib Library of binary files, made by ar. cd On Open GPS Cluster: cd ~edwards/work/apt/src/libapt.a cb Specify in list of libraries as "apt" (-lapt). cg LOCATION apt_base Location of ITEM. Usually a file or directory, but cg sometimes a computer system or network. cx newt bin Utility for reformatting a file, adding line numbers, cx and adding column numbers. cg PDF apt_base Probability distribution function. cx purge bin Utility routine for commenting out or extracting cx blocks of text or coding from a text or source file, cx that are bracketed by pairs of unique character cx strings. Also in bin. cx purge infile outfile pfile cx prompts for option (del. or com.), character strings, cx makes an altered output file cx and an extract file, pfile. cx Use to delete CIVIC coding with CVMGT lines: cx Brackets are "c***civic begins.", "c***civic ends." cs ranf apt/src A dummy function, wrapped around drand48. cs Function ranf.c came from Jim Rathkopf. cs Compile ranf.c as follows: cc -c ranf.c cg sources GPS All apt source files are in ~edwards/work/apt/src. cg Older versions are available on request. cx tar GPS Utility for creating a library of files, which may cx be replaced, tabulated, or extracted. cx Usage: cx tar cvf libfile * (create, add all files) cx tar xvf libfile module(s) (extract modules, blank cx for all) cx tar tvf libfile module(s) (list modules, * for all) cd work edwards Working directory on Open GPS cluster. cd Contains apt/src, apt/doc, lib. cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc c END OF DATA BASE. UCRL-WEB-209832