Real numbers and exact integers (49 series) Message #5 Posted by James M. Prange on 1 Dec 2004, 10:05 a.m., in response to message #4 by Vieira, Luiz C. (Brazil)
Well, make that "Exact" and "Approximate" modes for how the calculator treats integer valued numbers without decimal points. STD mode affects how reals are displayed.
This applies to the 49 series only.
An "exact integer" (also known as a "zint") can often be used where you'd normally use a "real" number because many commands start out by converting it to a real, but actually they're distinct object types, type 0 for reals, and type 28 for zints. In other cases, if any reals are involved in the operation, then all zints involved are converted to reals. In exact mode, if no reals are involved, then the result of an operation with zints is either a single zint or an algebraic (symbolic) object. With the calculator in exact mode, 1. 2 / returns .5, but 1 2 / returns '1/2'. Perhaps more to the point, 1. 3 / returns .333333333333 (an approximate result), but 1 3 / returns '1/3' (an exact result).
As you've noticed, zints and reals can't always be used interchangeably. Note that in IOPAR and PRTPAR, zints can't be substituted for reals.
In the case of arrays, if the elements aren't either all real numbers or all complex numbers, then it's a symbolic array (type 29). Symbolic arrays can include names, algebraic objects, and zints as elements, as well as real and complex numbers.
Note that a zint can have as many digits as can fit into the available memory.
To force a zint to a real, use the \->NUM command (over RightShift [ENTER]). To change all zints in a composite (program, list, or algebraic) to reals, with the 49 in approxomate mode, EDIT the object, and then press ENTER to recompile it. To toggle between exact and approximate mode, press [ENTER] while holding down RightShift. In the status area, note the = for exact or ~ for approximate.
Regards, James
Edited: 1 Dec 2004, 10:18 a.m.
|