Arithmetic Data Formats - IBM 5100 Basic Reference Manual

Hide thumbs Also See for 5100:
Table of Contents

Advertisement

42
Magnitude
The magnitude of a number is its absolute value. The range of numbers permitted in
5100 BASIC programs is greater than or equal to .1 E-99 and less than 1 E+99.
Precision
In BASIC, the precision of an integer or fixed-point number is the maximum number
. of significant digits it can contain. The precision of a floating-point number is the
number of significant digits to the left of the E (see Floating-Point Format). The
precision of numbers in the 5100 is 13 digits.
Arithmetic Data Formats
Arithmetic data can be entered, displayed, or printed in any of three formats: integer,
fixed point, or floating point. The appropriate format for a given number depends
on its magnitude and the level of arithmetic precision you require.
Numbers in any format can be positive or negative. Negative numbers must be
preceded by a minus sign. When no sign is specified, a number is treated as a posi-
tive number, so plus signs are optional.
Integer Format
Numbers expressed in integer format (I-format) are written as a number of digits
optionally preceded by a sign. Examples of numbers in integer format are:
o
+2
-23
2683
Fixed-Point Format
Numbers expressed in fixed-point format (F-format) are written as a number of
optional digits preceded by an optional sign and followed by a decimal point. The
decimal point can also be followed by a number of digits. These digits are required
if a number does not precede the decimal point. Examples of numbers in fixed-point
format are:
33.
33.00
-.3
+3.56
/
"
/
i
\
....
/
.""
...

Advertisement

Table of Contents
loading

Table of Contents