``

prev Menu next

Rational Numbers
If the rational number mode is selected (), or
`OPTION ARITHMETIC RATIONAL`
is written in a program unit, calculation becomes rational.
Rational numbers are outputted as a form of a improper fraction, but this form cannot be used for inputs or datum.
Rational numbers can be outputted as a decimal fraction by use of PRINT USING, whereas PRINT USING can deal at most 1000 digits.
The base for a power operation is limited to an integer of -2147483647 to 2147483647.
Any irrational functions such as SQR and trigonometric, exponential，or logarithmic functions are not available.
Internal files cannot contain rational numbers. That is, if rational numbers are outputted to an internal file, they cannot be read by a READ statement.
<Remarks>
Line breaks may be inserted in a numerals written to the text window at every about 3000 digit. This is due to a specification of MS-Windows. To avoid this, write to a file.
Ref. Overview of Files

P>