LIB9: Extended Precision Routines for BASIC
BASIC8-45
Submitted by: G. Chase
Abstract:
TAPE "A"
  1. "LARG2", add or multiply 2 extended-precision integers. A subset of H.-P.'s "L(A)RGNUM" program.
  2. "COLUMN", adds an arbitrary number (up to about 999) of extended-precision integers all at once, in a column, so to speak.
  3. "EXSUB", subtracts one extended-precision integer from another. Handles negative answers correctly.
  4. "EXDIV", swipes an algorithm from Knuth (V. 2) to allow division of an extended-precision dividend by an extended-precision divisor. Both quotient and remainder are printed in full precision (all digits).
TAPE "B"
  1. "FACFAC", from Knuth (V. I) is a remarkably simple program which lists the prime factors and their multiplicity (power) for the factorial of any single-precision integer typed by the user. In addition, a modified Stirling approximation is given of NAT. LOG (N!), COMMON LOG (N!), and of N!. Values of N! over 10 ^ 38 cause no overflow.
  2. "DEC10", extended-precision decimal integer converted to its extended precision octal equivalent.
  3. "DECFO", single precision A/B fraction *OR* extended-precision 0.12345 ... String converted into extended-precision octal string.
  4. "OCIDEC", the inverse of #6: octal integer to decimal. extended precision, input and output.
  5. "OCFDEC", the inverse of #7: octal fraction or octal string (0.12345 ... ) converted to decimal string. Extended precision. WARNING: #7-especially- and #9 in A/B input mode are quite capable of generating infinite answers.
Media Price Code: D3, Gl4
Catalog: August 1978