摘要 |
PURPOSE:To detect the occurrence of cancelling from the estimated mumber of significant digits by informing an FORTRAN processing system of the extent of left shifting from hardware, and then allowing the FORTRAN processing system to inform a programmer of the extent of shifting at need. CONSTITUTION:An FORTRAN compiler or library is devised partially, and the extent CA of shifting specified by a user is compared with the extent (n) of shifting that hardware indicates to obtain data n>CA. For arithmetic A=B-C, the FORTRAN compiler generates an object program PR2 from a source program PR1 according to an option specified by the user. This program PR2 consists of instructions L[to load data B into register r0], SB[to subtract data C from contents B of register r0], ST[to store result A in register r0], L[to load address of library LIB into register r15], and BALR[to branch to register 15](r14; next address after branch procesing). For the processing of the subtraction part, normalized numbers B and C are fetched and their index parts EB and EC are taken out for digit justification; when EB>EC, arithmetic t=EB-EC is performed. |