This is an old revision of the document!

A number in newRPL is represented as exact or approximate. To enter a number as approximate use a trailing dot. To enter a number as exact omit any trailing dot. For routine arithmetic this distinction doesn't matter much, but it does come into play when evaluating symbolic expressions.

Here are some examples:

Approximate Numbers Exact Numbers
1. 1
1.007. 1.007
1.007.e-10 1.007e-10

Arithmetic performed on numbers takes into account the operands (exact or approximate) and results are displayed accordingly.

For example, 1 3 / results in 0.333. (approximate), whereas 1 2 / results in 0.5 (exact).

Numbers in different bases can be entered by preceeding the value with a # and a trailing letter to indicate the base (b = binary, o = octal, d = decimal, h = hex, note that the trailing letter is case insensitive). Arithmetic can be done on numbers in different bases with the result displayed as the base of the first argument. Only exact numbers in the range $-2^{63}$ to $2^{63}-1$ can be expressed in multiple bases. Outside this range (or approximate numbers) will be switched to decimal.

  • manual/chapter3/reals.1497227073.txt.gz
  • Last modified: 2017/06/11 17:24
  • by smartin