Appendix A: System Routines — Graphing
583
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
CkValidDelta
Declaration:
BYTE
CkValidDelta
(BCD16
maxrng
, BCD16
minrng
, BCD16
delta
)
Category(ies):
Graphing
Description:
Checks to see if the exponent of
delta
is too small relative to the exponents
of
maxrng
and
minrng
so that all the significant digits of
delta
would be
shifted out of the floating-point mantissa when performing arithmetic.
Inputs:
maxrng
— Final value in graph window variable sequence (e.g., xmax,
ymax, tmax, etc.).
minrng
— First value in graph window variable sequence (e.g., xmin,
ymin, tmin, etc.).
delta
— Increment value that will be used to compute sequence from
minrng
to
maxrng
(e.g.,
∆
x,
∆
y, tstep, etc.).
Outputs:
1 if
delta
is valid, 0 if the exponent of
delta
is too small.
Assumptions:
Assumes the sign of
delta
has already been verified as correct for
computing a sequence from
minrng
to
maxrng
. It is valid for
maxrng
to be
less than
minrng
if
delta
is negative.
Side Effects:
None
Availability:
All versions of the TI-89 / TI-92 Plus.
TI
-
89 / TI
-
92 Plus
Differences:
None
See Also: StepCk
Example:
/* make sure there is a unique x for every horizontal pixel in the graph */
if( !CkValidDelta( (gr_active->rngp)[GR_XMAX], (gr_active->rngp)[GR_XMIN],
(gr_active->rngp)[GR_DELTAX] ))
ER_throw( ER_RANGE ); /* cannot compute a unique x for every pixel */