Disclaimer. This on-line distribution of algorithms is not an official service of the Association for Computing Machinery (ACM). This service is being provided on a trial basis and may be discontinued in the future. ACM is not responsible for any transmission errors in algorithms received by on-line distribution. Columns 73-80 have been deleted and trailing blanks removed. Standard machine constant and error handling routines have sometimes been removed from the individual algorithms and collected into the libraries "core" and "slatec". We have tried to incorporate published Remarks; if we missed something, please contact Eric Grosse, ehg@research.att.com. The material in this library is copyrighted by the ACM, which grants general permission to distribute provided the copies are not made for direct commercial advantage. For details of the copyright and dissemination agreement, consult the current issue of TOMS.