IBM 1130 User Manual page 512

Computing system
Hide thumbs Also See for 1130:
Table of Contents

Advertisement

Output of Large Real Numbers
A second precaution must be taken with very large
numbers, and it falls in the area of output. Because
most fractions are inexactly represented and will
al ways be less than the true decimal value, the
FORTRAN output routines (including the TRACE)
always add a single bit in the low-order position of
the number, attempting to compensate for this
inaccuracy.
For this reason, you rarely notice the
inaccuracy.
For example,
if
you multiplied 0.35 by 100.0,
you would expect to get 35., exactly. The binary
result, however, converted to decimal, is
34.9999999999999999757138713 ...
(because the multiplier of 0.35 is an inexact
fraction).
That is not the result you see, though,
since the FORTRAN output routine adds its one low-
order bit, resulting in
35.0000000298023223634091838 ...
Although that is no more exact than the previous
value, it looks better; in fact, you would never
notice the extra
.0000000298023223876953125
unless you output the number with a format like
F40.20, which would be unusual.
If
your number is large, however, this "little
extra" can cause the output to be noticeably in error.
For example, the whole number 2111111111. , while
represented exactly in core storage, will be output
as 2111111112., an -error of 1. unit.
This problem will occur with numbers in the
range 1,073,741,824. to 2,147,483,647.
if
they are
output with a standard FORTRAN F format.
For
this reason, you may wish to limit the magnitude of
all numbers to 1,073,741,824., or, easier to
remember, nine digits (999, 999, 999. )
This problem does not occur
if
the value is printed
as alphabetic data, converted by the PUT subroutine
of the Commercial Subroutine Package. This
routine will not add the extra bit, and all whole
numbers up to 2, 147, 483, 647. will be output exactly.
Section
Subsections
Page
70
10
I
20
04
Multiplication of Large Real Numbers
Because of the manner in which the 1130 performs
multiplication, a product is accurate only to 30 bits.
This means that a product exceeding 1,073,741,823.
may not be exactly correct, In fact, there is a 75-25
chance that it will be correct, and a 25-75 chance
that it will be off by 1. unit.
While this is quite satisfactory for technical
work, it cannot be permitted in most commercial
applications.
For this reason, you should avoid
multiplications that might yield such a large product.
Note that this limitation does not apply to addition
and subtraction, where all 31 bits may be used -
and the upper limit is 2,147,483,647.

Advertisement

Table of Contents
loading

Table of Contents