EasyManua.ls Logo

Texas Instruments TI-89 - Push_Round

Texas Instruments TI-89
1398 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
824
Appendix A: System Routines — Math
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
push_round
Declaration:
void
push_round
(EStackIndex
val_idx
, EStackIndex
num_dig_idx
)
Category(ies):
Math
Description:
Pushes onto the estack the argument rounded to the specified number of
digits.
Inputs:
val_idx
Indexes the input number, list, or matrix.
num_dig_idx
Indexes the number of digits after the decimal place to
round to or if NULL then uses the default value from the
MODE settings.
Outputs:
None
Assumptions:
None
Side Effects:
May expand expression stack, cause heap compression, or throw an error.
Availability:
On AMS 2.00 and higher.
TI-89 / TI-92 Plus
Differences:
None
See Also:
None
Example:
This example creates a static column vector and a static integer then
creates a unit vector from the column vector and finally rounds that result
to four decimal places.
/* static column vector */
static const Quantum colVec[] = {END_TAG,
END_TAG,3,1,NONNEGATIVE_INTEGER_TAG,LIST_TAG,
END_TAG,2,1,NONNEGATIVE_INTEGER_TAG,LIST_TAG,
END_TAG,1,1,NONNEGATIVE_INTEGER_TAG,LIST_TAG,
LIST_TAG
};
#define colVecIndex ((EStackIndex) (colVec+sizeof(colVec)-1))
static const Quantum Integer4 [] = {4u, 1u, NONNEGATIVE_INTEGER_TAG};
#define Integer4Index ((EStackIndex) (Integer4+2))
push_unitv( colVecIndex );
push_round( top_estack, Integer4Index );

Table of Contents

Other manuals for Texas Instruments TI-89

Related product manuals