LIB9: Extended Precision Routines for BASIC
| BASIC8-45
|
Submitted by: G. Chase
Abstract:
- TAPE "A"
- "LARG2", add or multiply 2 extended-precision integers. A
subset of H.-P.'s "L(A)RGNUM" program.
- "COLUMN", adds an arbitrary number (up to about 999) of
extended-precision integers all at once, in a column, so to speak.
- "EXSUB", subtracts one extended-precision integer from another.
Handles negative answers correctly.
- "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"
- "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.
- "DEC10", extended-precision decimal integer converted to its
extended precision octal equivalent.
- "DECFO", single precision A/B fraction *OR* extended-precision
0.12345 ... String converted into extended-precision octal
string.
- "OCIDEC", the inverse of #6: octal integer to decimal. extended
precision, input and output.
- "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