Push_Rand - Texas Instruments TI-89 Developer's Manual

Graphing calculator
Hide thumbs Also See for TI-89:
Table of Contents

Advertisement

Appendix A: System Routines — Math

push_rand

Declaration:
void push_rand (EStackIndex num_idx )
Category(ies):
Math
Description:
Pushes a random number onto the estack. If num_idx indexes the
END_TAG then a floating-point number between zero and one is
generated. If the number indexed by num_idx is a positive integer then a
number between one and that number is generated. If the number indexed
by num_idx is a negative integer then a number between that integer and
minus one is generated.
num_idx — Indexes the input number (may index an END_TAG).
Inputs:
Outputs:
None
Assumptions:
None
Side Effects:
May expand expression stack, cause heap compression, or throw an error.
Availability:
On AMS 1.05 and higher.
TI-89 / TI-92 Plus
Differences:
None
See Also:
push_randmat, push_randpoly, push_randnorm
Example:
This example pushes a list of ten random numbers in the range [0.0, 1.0]
on the estack.
EStackIndex esi;
short i;
push_quantum( END_TAG );
esi = top_estack;
for (i = 1; i <= 10; i++)
push_rand( esi );
push_quantum( LIST_TAG );
TI-89 / TI-92 Plus Developer Guide
/* index END_TAG (so get numbers in range 0 . . . 1) */
Not for Distribution
815
Beta Version January 26, 2001

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ti-92 plusTi-92 plus

Table of Contents