FLOATING POINT SUBROUTINES

A set of subroutines are provided with the PDP-3 to perform floating

point arithmetic. In these, the PDP-3 36 bit word is divided to form a

27 bit mantissa, a, and 9 bit exponent, b. Numbers, thus, appear in the

form: k = ax2^b where, a, is considered to be in fractional form in the

range 1/2 <= a < 1, and b is an integer, 0 <= b < 29. This gives number,

k, the range 10^{-76} < k < 10^{+76}.

The subroutines are called with one operand in the accumulator. After

the subroutine has been executed, the accumulator contains the answer.

Thus floating point numbers are essentially handled as regular logical

works. The format of the number allows magnitude comparisons to be made

by conventional arithmetic as bit 0 is the sign of the number, bits 1 to

9 the exponent, and the remaining 26 bits, together with the sign bit,

the mantissa in ones complement arithmetic. The arithmetic subroutines

are: add, subtract, multiply, divide, convert a floating point number to

binary, convert a binary number to a floating number. Additional

routines form: [square root of x], e^x, ln x, sine(~pi~/2)x,

cos(~pi~/2)x, tan^{-1}x. There are also programs to convert between

floating decimal numbers and PDP-3 floating numbers.

Routines which require two operands, e.g., add, subtract, multiply and

divide, require an index register to specify the address of the second

operand. An index register also specifies parameters in data

conversions, e.g., the position of the binary point when converting a

binary number to a standard floating number.

Using the floating point subroutines, additional routines may be written

which handle complex floating numbers and vector and matrix algebra.

Preliminary Specifications: Programmed Data Processor Model Three (PDP-3) October, 1960 · 第 65 / 71 题