This header file contains the following functions:
all_tail any_tail are_expressions_identical can_be_approxed check_estack_size compare_complex_magnitudes compare_expressions compare_Floats delete_between deleted_between delete_expression deleted_expression did_push_cnvrt_Float_to_integer display_statements estack_number_to_Float estack_to_short estack_to_ushort factor_base_index factor_exponent_index gcd_exact_whole_Floats get_key_ptr GetValue HS_popEStack HToESI im_index index_below_display_expression_aux index_main_var index_numeric_term index_of_lead_base_of_lead_term is_advanced_tag is_antisymmetric is_complex_number is_complex0 is_Float_exact_whole_number is_free_of_tag is_independent_of is_independent_of_de_seq_vars is_independent_of_elements is_independent_of_tail is_matrix is_monomial is_monomial_in_kernel is_narrowly_independent_of is_square_matrix is_symmetric is_tail_indepenent_of is_valid_smap_aggregate last_element_index lead_base_index lead_exponent_index lead_factor_index lead_term_index likely_approx_to_complex_number likely_approx_to_number main_gen_var_index map_tail map_tail_Int map_unary_over_comparison min_quantum move_between_to_top moved_between_to_top next_expression_index NG_approxESI NG_execute NG_graphESI NG_rationalESI NG_tokenize NG_RPNToText norm1_complex_Float numeric_factor_index Parms2D Parse1DExpr Parse2DExpr Parse2DMultiExpr Print2DExpr push_ANSI_string push_between push_cnvrt_integer_if_whole_nmb push_END_TAG push_expr_quantum push_expr2_quantum push_Float push_Float_to_nonneg_int push_Float_to_rat push_internal_simplify push_list_plus push_LIST_TAG push_list_times push_longint push_matrix_product push_next_arb_int push_next_arb_real push_next_internal_var push_offset_array push_overflow_to_infinity push_parse_text push_pow push_quantum push_quantum_pair push_reversed_tail push_round_Float push_string re_index reductum_index remaining_element_count remaining_factors_index reset_estack_size reset_control_flags should_and_did_push_approx_arg2 signum_Floatthe following global variables:
top_estackand the following constants and predefined types:
bcd Bool ESI ExtTags HANDLE H_NULL InstructionTags NULL Tags ti_float SCR_RECT SysvarTags WINDOWNOTE: See also related header file args.h.
push_Float (real_part); push_Float (imaginary_part); push_quantum (COMPLEX_TAG);See push_Float, and info about top_estack and Tags for more info about this example.
push_longint (100); push_quantum_pair (VAR_X_TAG, ADD_TAG); push_string (top_estack);the string
"x+100"
will be pushed at the top of the expressions stack.
See info about top_estack
and Tags for more info about this example.
'x*3'
into '3*x'
and converts
'x-y'
into 'x+y*(-1)'
, although it will be printed as
'x-y'
. However, expressions
created by push_parse_text are always as-is, i.e.
'3*x'
will be just '3*x'
, not 'x*3'
. Some routines
(like numeric_factor_index for example) may be fooled if
the expression is not "sorted" correctly. Also, some routines
(like lead_term_index, lead_factor_index
etc.) may also be fooled with expressions like 'x-y'
and
'x/y'
, because operators '-'
and '/'
are usually never seen in
expressions during symbolic processing (the processing is more unique if addition and
substraction are treated as the same operation; the same is true for '*'
and
'/'
). So, if you
planed to perform some advanced symbolic processing which is based on accessing various
part of the expression, always call push_internal_simplify
after calling push_parse_text. This function pushes on the expressions stack the same expression
but converted in internal canonic form.
'-'
for
unary minus, etc. See NG_tokenize for a more powerful function which
don't throw any errors, and which can determine the exact location and type of the error.
short is_positive_integer (ESI ptr) { return *ptr == POSINT_TAG; }and suppose that start_ptr points to the first element of the list (one byte below LIST_TAG). Then, you can use the following call to check whether all elements of the lists are positive integers:
are_all_positive_integers = all_tail (is_positive_integer, start_ptr);
is_any_positive_integer = any_tail (is_positive_integer, start_ptr);
'n<5'
into 'n!<120'
). Beware that squaring of
both sides of an inequality can cause losing of solutions, and squaring both sides of an
equation may introduce spurious solutions!
'sqrt(2)'
is not a "number" in this convention.
A complex number is a "number" if both real and imaginary parts are "numbers" in a sense
of the convention given above. See also
likely_approx_to_number.
'x*y^3'
is a monomial, and
x+y*z'
or 'ln(x)'
are not.
'sin(x)*ln(y)'
is not monomial (in respect to 'x'
and 'y'
), but it is monomial in kernel (in respect to 'sin(x)'
and 'ln(y)'
).
is_independent_of_elements (expr_ptr, varlist_ptr)is the same as
is_independent_of_tail (expr_ptr, varlist_ptr - 1)
'ln(2+sin(1))/5'
, '1/0'
or
'x^2+1-x*x'
), else returns FALSE.
Complex is a Boolean parameter:
if it is TRUE, complex results will be allowed, but if it
is FALSE, complex results will be treated as "can not be approxed".
'ln(2+sin(1))/5'
can be approxed to a number, but this is not so obvious for
expression 'x^2+1-x*x'
, because it
contains a symbolic variable name. See can_be_approxed for more
detailed investigation of possibility of approximation.
'expand(...,var)'
or 'Integral(...,var)'
, a variable var
is "most main". Otherwise, the 26 Roman one-letter variables order
r>>s>>...>>z>>a>>b>>...>>q ('>>' means "more main"),
which order more main than all other variables, which order alphabetically. Functions and operators
are typically ordered by recursively comparing their first arguments, with ties broken by
comparing their second arguments, etc. then finally comparing the operators or functions, if
necessary. For example:
x
is more main than 4;x
is less main than r
;x
is more main than ln(y)
;x
is less main than ln(x)
.
'(2+x)+y'
converted to canonic form is 'x'
.
By default, similar powers of the main variable are collected in internal canonic forms.
For example, the lead term of 'x^2*y+x^2+5'
converted to canonic form is
'x^2*(y+1)'
. See push_internal_simplify
for more info about how to convert an expression into the internal canonic form.
'2+x+y'
converted to canonic form is 'y+2'
.
By default, similar powers of the main variable are collected in internal canonic forms.
For example, the reductum of 'x^2*y+x^2+5'
converted to canonic form is
'5'
. See push_internal_simplify
for more info about how to convert an expression into the internal canonic form.
'(3*x^2)*y'
converted into canonic form is
'x^2'
. Internally-simplified numeric denominator factors are combined with
numeric numerator factors into a fractional numeric factor. Non-numeric denominator
factors are internally simplified to be merged with numerator factors as negative powers.
For example, the lead factor of '2/x'
converted into canonic form is
'x^-1'
. A factor having a sum as its base orders shallower than a factor
having the sum’s main variable as its base. For example, the lead factor
of '(x+1)^-2*x^3'
converted into canonic form is '(x+1)^-2'
.
See push_internal_simplify
for more info about how to convert an expression into the internal canonic form.
'(3*x^2)*y'
converted into canonic form
are '3*y'
. By default, similar powers of the main variable are collected, so
remaining factor of 'x^2*y+x^2'
after conversion into canonic form is
'y+1'
. Internally-simplified numeric denominator factors are combined with
numeric numerator factors into a fractional numeric factor. Non-numeric denominator
factors are internally simplified to be merged with numerator factors as negative powers.
See push_internal_simplify
for more info about how to convert an expression into the internal canonic form.
'3*x^2*y'
contains a numeric factor (3),
but '2*x+3'
does not. Also, numeric factors in numerators and denominators are
always simplified into a single numeric factor in internal canonic forms (so, the numeric
factor of '6*x/(4*y)'
after conversion to canonic form is 3/2. Fortunately,
all expressions in argument are always in internal canonic form. However, this is not true after
push_parse_text function, nor after an evaluation using
NG_rationalESI or NG_approxESI. In
other words, results of these commands are not always "correctly" organized. To force converting
an expression to the internal canonic form, always call
push_internal_simplify after usage any of functions
mentioned above.
'sin(x)+y'
, index_main_var
will return a pointer to 'x'
, but main_gen_var_index will return a pointer to
'sin(x)'
. Generalized variable can be an ordinary variable, the base of a
noningeger power, or a kernel (like 'sin(x)'
), meaning any other irrational
subexpression.
'2^x'
and 'x^2'
are not the same expression). This implies that "main generalized variable"
of a sum, a product or an integer power is equal to the main generalized variable of a lead term,
a lead factor or a base respectively. Otherwise, main generalized variable is the expression
itself. For example, main "generalized variables" of expressions 'sin(x)^2*y+ln(z)'
,
'3^(1/5)+2'
and '(x+y)^(1/2)+x'
are 'sin(x)'
,
'3'
and 'x+y'
respectively.
push_parse_text ("sin(1.3)+log(2)/7"); NG_approxESI (top_estack); printf_xy (0, 50, "%f", estack_number_to_Float (top_estack));See push_parse_text and estack_number_to_Float to understand how this example works.
push_parse_text ("ClrGraph : Graph sin(x)"); handle = HS_popEStack (); NG_execute (handle, 0); HeapFree (handle);When approx_flag is non-zero, the sequence will be executed in "approx" mode (like running with [DIAMOND]+[ENTER]). Else, the current mode settings will be used. This routine is called after NG_RPNToText from the home screen.
push_parse_text ("expand((x+1)(x+2)(x+3))"); NG_rationalESI (top_estack); handle = display_statements (top_estack, 1, 1); printf_xy (0, 40, "%s", HeapDeref (handle)); HeapFree (handle);See push_parse_text, NG_rationalESI, HeapDeref and HeapFree to understand how this example works.
push_END_TAG (); push_quantum (VAR_X_TAG); push_parse_text ("1/((x-3)(x^2+4))"); push_quantum (INTEGRATE_TAG); NG_rationalESI (top_estack); // evaluates the expression WinClr (DeskTop); Print2DExpr (Parse2DExpr (top_estack, FALSE), DeskTop, 0, 50);It is also possible to use
Parse2DExpr (top_estack, FALSE); Print2DExpr (top_estack, DeskTop, 0, 50);instead of
Print2DExpr (Parse2DExpr (top_estack, FALSE), DeskTop, 0, 50);You can use Parms2D to get information about the height and the width of the printed expression without displaying it on the screen. This may be used to determining coordinates where the expression need to be displayed.
Algebraic form: | integrate (e^(x^2), x, 1, 2) |
RPN form: | 2 1 2 x ^ e ^ integrate |
Sequence of bytes: | [02 01 1F] [01 01 1F] [08] [02 01 1F] [08] [93] [25] [93] [C4] |
Algebraic form: | sum (sqrt (1 + x), x, 0, a) |
RPN form: | a 0 x x 1 sqrt sum |
Sequence of bytes: | [0B] [00 1F] [08] [08] [01 01 1F] [8B] [51] |
Algebraic form: | a + b + a - b + (a + b) * (a - b) -> a |
RPN form: | a b + a + b - a b + a b - * + a -> |
Sequence of bytes: | [0B] [0C] [8B] [0B] [8B] [0C] [8D] [0B] [0C] [8B] [0B] [0C] [8D] [8F] [8B] [0B] [80] |
Algebraic form: | {{1, 2}, {3, 4}} |
RPN form: | END_TAG END_TAG 4 3 LIST_TAG END_TAG 2 1 LIST_TAG LIST_TAG |
Sequence of bytes: | [E5] [E5] [04 01 1F] [03 01 1F] [D9] [E5] [02 01 1F] [01 01 1F] [D9] [D9] |
Algebraic form: | my_func (a, b, c) |
RPN form: | END_TAG c b a my_func USERFUNC_TAG |
Sequence of bytes: | [E5] [0D] [0C] [0B] [00 6D 79 5F 66 75 6E 63 00] [DA] |
'x*3'
and
'x+3'
becomes '3*x'
and '3+x'
(although
the second example will be printed as 'x+3'
). Also, expressions like 'x/y'
or
'x-y'
in internal canonic form do not contain substractions and divisions.
As the parameter list (when the program is called from TI-Basic) is always in internal
canonic form, such expressions will never be observed as-is in parameter lists
etc. because they will be converted before passing them to the program. A lot of functions
for algebraic manipulations automatically convert the expression in the internal canonic form,
but when this is not true, you can always force the conversion using explicite call to
push_internal_simplify function. Note that the reverse conversion
(i.e. back from the canonic form into a regular form) is performed anytime when you try to
print out the expression. Here is the list of the most common transformations which appears
during the transformation into the internal canonic form:
Expression | Standard canonnic form |
-x | (-1)*x |
x-y | x+y*(-1) |
x/y | x*y^(-1) |
e^x | exp(x) |
x^y | exp(ln(x)*y) [ except when "y" is an integer or a fraction ] |
e | exp(1) |
sqrt(x) | x^(1/2) |
log(x) | ln(x)*(ln(10)^(-1)) |
sin(x) | trig(x,0) [ assuming "radian" mode; for "trig" function, see SINCOS_TAG ] |
cos(x) | trig(x,1) |
tan(x) | trig(x,0)*trig(x,1)^(-1) |
sinh(x) | exp(x)*(1/2)+exp(x)^(-1)*(-1/2) |
cosh(x) | exp(x)*(1/2)+exp(x)^(-1)*(1/2) |
tanh(x) | (exp(x)^2+1)^(-1)*(exp(x)^2+(-1)) |
x xor y | (not x and y) or (x and not y) |
#include <tigcclib.h> int _ti89; void _main(void) { printf_xy (0, 50, "Top=%lx", top_estack); ngetchx (); }Run this program in VTI and pass to it parameters as you want. top_estack will be shown on the screen. During waiting for a keypress, enter the debugger and look the addresses below shown address, to see how parameters are stored.
typedef char *ESI;See top_estack and Tags for more info about the expressions stack.
00 | VAR_NAME_TAG | variable name (with more than one letter) |
01 | _VAR_Q_TAG | variable q (but not used - 1B is used normally) |
02 | VAR_R_TAG | variable r |
03 | VAR_S_TAG | variable s |
04 | VAR_T_TAG | variable t |
05 | VAR_U_TAG | variable u |
06 | VAR_V_TAG | variable v |
07 | VAR_W_TAG | variable w |
08 | VAR_X_TAG | variable x |
09 | VAR_Y_TAG | variable y |
0A | VAR_Z_TAG | variable z |
0B | VAR_A_TAG | variable a |
0C | VAR_B_TAG | variable b |
0D | VAR_C_TAG | variable c |
0E | VAR_D_TAG | variable d |
0F | VAR_E_TAG | variable e |
10 | VAR_F_TAG | variable f |
11 | VAR_G_TAG | variable g |
12 | VAR_H_TAG | variable h |
13 | VAR_I_TAG | variable i |
14 | VAR_J_TAG | variable j |
15 | VAR_K_TAG | variable k |
16 | VAR_L_TAG | variable l |
17 | VAR_M_TAG | variable m |
18 | VAR_N_TAG | variable n |
19 | VAR_O_TAG | variable o |
1A | VAR_P_TAG | variable p |
1B | VAR_Q_TAG | variable q |
1C | EXT_SYSTEM_TAG | system token (a byte before the tag identifies a system variable, see SysvarTags) |
1D | ARB_REAL_TAG | arbitrary real number @xxx (byte before the tag determines xxx) |
1E | ARB_INT_TAG | arbitrary integer number @nxxx (byte before the tag determines xxx) |
1F | POSINT_TAG | positive integer tag |
20 | NEGINT_TAG | negative integer tag |
21 | POSFRAC_TAG | positive fraction tag |
22 | NEGFRAC_TAG | negative fraction tag |
23 | FLOAT_TAG | floating point tag |
23 | BCD_TAG | floating point tag (alias tag name) |
24 | PI_TAG | constant pi |
25 | EXP_TAG | constant e |
26 | IM_TAG | constant i |
27 | NEGINFINITY_TAG | -infinity |
28 | INFINITY_TAG | infinity |
29 | PN_INFINITY_TAG | +/- infinity |
2A | UNDEF_TAG | undef |
2B | FALSE_TAG | false |
2C | TRUE_TAG | true |
2D | STR_TAG | string tag |
2E | NOTHING_TAG | allows missing terms in expressions |
2F | ACOSH_TAG | expr acosh |
30 | ASINH_TAG | expr asinh |
31 | ATANH_TAG | expr atanh |
35 | COSH_TAG | expr cosh |
36 | SINH_TAG | expr sinh |
37 | TANH_TAG | expr tanh |
3B | ACOS_TAG | expr acos |
3C | ASIN_TAG | expr asin |
3D | ATAN_TAG | expr atan |
41 | RACOS_TAG | expr arcos (used only internally) |
42 | RASIN_TAG | expr arsin (used only internally) |
43 | RATAN_TAG | expr artan (used only internally) |
44 | COS_TAG | expr cos |
45 | SIN_TAG | expr sin |
46 | TAN_TAG | expr tan |
4A | ITAN_TAG | expr tan (used only internally) |
4B | ABS_TAG | expr abs |
4C | ANGLE_TAG | expr angle |
4D | CEILING_TAG | expr ceiling |
4E | FLOOR_TAG | expr floor |
4F | INT_TAG | expr int |
50 | SIGN_TAG | expr sign |
51 | SQRT_TAG | expr _sqrt_ |
52 | EXPF_TAG | expr _e_^ |
53 | LN_TAG | expr ln |
54 | LOG_TAG | expr log |
55 | FPART_TAG | expr fPart |
56 | IPART_TAG | expr iPart |
57 | CONJ_TAG | expr conj |
58 | IMAG_TAG | expr imag |
59 | REAL_TAG | expr real |
5A | APPROX_TAG | expr approx |
5B | TEXPAND_TAG | expr tExpand |
5C | TCOLLECT_TAG | expr tCollect |
5D | GETDENOM_TAG | expr getDenom |
5E | GETNUM_TAG | expr getNum |
60 | CUMSUM_TAG | list cumSum |
61 | DET_TAG | mat det |
62 | COLNORM_TAG | mat colNorm |
63 | ROWNORM_TAG | mat rowNorm |
64 | NORM_TAG | mat norm |
65 | MEAN_TAG | list mean |
66 | MEDIAN_TAG | list median |
67 | PRODUCT_TAG | list product |
68 | STDDEV_TAG | list stdDev |
69 | SUM_TAG | list sum |
6A | VARIANCE_TAG | list variance |
6B | UNITV_TAG | vec unitV |
6C | DIM_TAG | mat dim |
6D | MAT2LIST_TAG | mat mat->list |
6E | NEWLIST_TAG | no_of_elements newList |
6F | RREF_TAG | mat rref |
70 | REF_TAG | mat ref |
71 | IDENTITY_TAG | integer identity |
72 | DIAG_TAG | mat diag |
73 | COLDIM_TAG | mat colDim |
74 | ROWDIM_TAG | mat rowDim |
75 | TRANSPOSE_TAG | mat _transpose_ |
76 | FACTORIAL_TAG | expr ! |
77 | PERCENT_TAG | expr % |
78 | RADIAN_TAG | expr _radians_ |
79 | NOT_TAG | expr not |
7A | MINUS_TAG | expr _negative_ |
7B | VEC_POLAR_TAG | mat _polar_vector_ (mat is assumed to be [[R,THETA]]) |
7C | VEC_CYLIND_TAG | mat _cylind_vector_ (mat is assumed to be [[R,THETA,Z]]) |
7D | VEC_SPHERE_TAG | mat _sphere_vector_ (mat is assumed to be [[R,THETA,PHI]]) |
7E | START_TAG | ( (used only internally, don't use it) |
7F | ISTORE_TAG | expr var -> (internal version: don't use) |
80 | STORE_TAG | expr var -> |
81 | WITH_TAG | condition expr | |
82 | XOR_TAG | expr2 expr1 xor |
83 | OR_TAG | expr2 expr1 or |
84 | AND_TAG | expr2 expr1 and |
85 | LT_TAG | expr2 expr1 < |
86 | LE_TAG | expr2 expr1 <= |
87 | EQ_TAG | expr2 expr1 = |
88 | GE_TAG | expr2 expr1 >= |
89 | GT_TAG | expr2 expr1 > |
8A | NE_TAG | expr2 expr1 <> |
8B | ADD_TAG | expr1 expr2 + |
8C | ADDELT_TAG | expr1 expr2 .+ |
8D | SUB_TAG | expr1 expr2 - |
8E | SUBELT_TAG | expr1 expr2 .- |
8F | MUL_TAG | expr1 expr2 * |
90 | MULELT_TAG | expr1 expr2 .* |
91 | DIV_TAG | expr1 expr2 / |
92 | DIVELT_TAG | expr1 expr2 ./ |
93 | POW_TAG | expr2 expr1 ^ |
94 | POWELT_TAG | expr2 expr1 .^ |
95 | SINCOS_TAG | int expr trig where trig(expr,int)=cos(expr+(int-1)*pi/2) |
96 | SOLVE_TAG | var equation solve |
97 | CSOLVE_TAG | var equation cSolve |
98 | NSOLVE_TAG | var equation nSolve |
99 | ZEROS_TAG | var equation zeros |
9A | CZEROS_TAG | var equation cZeros |
9B | FMIN_TAG | var equation fMin |
9C | FMAX_TAG | var equation fMax |
9D | COMPLEX_TAG | complex number |
9E | POLYEVAL_TAG | expr list polyEval |
9F | RANDPOLY_TAG | order var randPoly |
A0 | CROSSP_TAG | vec2 vec1 crossP |
A1 | DOTP_TAG | vec2 vec1 dotP |
A2 | GCD_TAG | expr2 expr1 gcd |
A3 | LCM_TAG | expr2 expr1 lcm |
A4 | MOD_TAG | expr2 expr1 mod |
A5 | INTDIV_TAG | expr2 expr1 intDiv |
A6 | REMAIN_TAG | expr2 expr1 remain |
A7 | NCR_TAG | expr2 expr1 nCr |
A8 | NPR_TAG | expr2 expr1 nPr |
A9 | P2RX_TAG | theta_expr r_expr P->Rx |
AA | P2RY_TAG | theta_expr r_expr P->Ry |
AB | P2PTHETA_TAG | y_expr x_expr R->P_THETA_ |
AC | P2PR_TAG | y_expr x_expr R->Pr |
AD | AUGMENT_TAG | mat2 mat1 augment |
AE | NEWMAT_TAG | num_columns num_rows newMat |
AF | RANDMAT_TAG | num_columns num_rows randMat |
B0 | SIMULT_TAG | vec mat simult |
B1 | PART_TAG | [#] expr part |
B2 | EXP2LIST_TAG | var list exp->list |
B3 | RANDNORM_TAG | sd mean randNorm |
B4 | MROW_TAG | index mat expr mRow |
B5 | ROWADD_TAG | index2 index1 mat rowAdd |
B6 | ROWSWAP_TAG | index2 index1 mat rowSwap |
B7 | ARCLEN_TAG | end start var expr arcLen |
B8 | NINT_TAG | up low var expr nInt |
B9 | PI_PRODUCT_TAG | high low var expr _PRODUCT_ |
BA | SIGMA_SUM_TAG | high low var expr _SIGMA_ |
BB | MROWADD_TAG | index2 index1 mat expr mRowAdd |
BC | ANS_TAG | [int] ans |
BD | ENTRY_TAG | [int] entry |
BE | EXACT_TAG | [tol] expr exact |
BF | LOGB_TAG | expr2 expr1 logb where logb(expr1,expr2)=ln(expr1)/ln(expr2) |
C0 | COMDENOM_TAG | [var] expr comDenom |
C1 | EXPAND_TAG | [var] expr expand |
C2 | FACTOR_TAG | [var] expr factor |
C3 | CFACTOR_TAG | [var] expr cFactor |
C4 | INTEGRATE_TAG | [up low] var expr _integrate_ |
C5 | DIFFERENTIATE_TAG | [order] var expr _differentiate_ |
C6 | AVGRC_TAG | [h] var expr avgRC |
C7 | NDERIV_TAG | [h] var expr nDeriv |
C8 | TAYLOR_TAG | [point] order var expr taylor |
C9 | LIMIT_TAG | [direction] point var expr limit |
CA | PROPFRAC_TAG | [[tol] var] expr propFrac |
CB | WHEN_TAG | [[undef_val] false_val] true_val condition when |
CC | ROUND_TAG | [digits] expr round |
CD | DMS_TAG | [[ss] mm] dd _DMSNUMBER_ |
CE | LEFT_TAG | [num] string left |
CF | RIGHT_TAG | [num] string right |
D0 | MID_TAG | [count] start string mid |
D1 | SHIFT_TAG | [int] list shift |
D2 | SEQ_TAG | [step] high low var expr seq |
D3 | LIST2MAT_TAG | [elements_per_row] list list->mat |
D4 | SUBMAT_TAG | [[[[col2] row2] col1] row1] mat subMat |
D5 | SUBSCRIPT_TAG | [col] row var _subcript_ (i.e. var[row] or var[row,col]) |
D6 | RAND_TAG | [int] rand |
D7 | MIN_TAG | expr2 list|expr1 min |
D8 | MAX_TAG | expr2 list|expr1 max |
D9 | LIST_TAG | list tag, or matrix represented as "list of list" |
DA | USERFUNC_TAG | user defined function/program ([[...] arg1] fnc_name USERFUNC_TAG) |
DB | MATRIX_TAG | matrix tag (only in data editor) |
DC | FUNC_TAG | program/function tag (not used in expressions) |
DD | DATA_TAG | data tag (not used in expressions) |
DE | GDB_TAG | GDB tag (not used in expressions) |
DF | PIC_TAG | picture tag (not used in expressions) |
E0 | TEXT_TAG | text tag (not used in expressions) |
E1 | FIG_TAG | figure tag (not used in expressions) |
E2 | MAC_TAG | macro tag (not used in expressions) |
E3 | EXT_TAG | extra TI-Basic function token (see ExtTags) |
E4 | EXT_INSTR_TAG | TI-Basic command token (not used in expressions, see InstructionTags) |
E5 | END_TAG | end of the expression or the list (END_TAG) |
E6 | COMMENT_TAG | comment (not used in expressions) - organized like a string |
E7 | NEXTEXPR_TAG | ":" between tokens on same line in the program (not used in expressions) |
E8 | NEWLINE_TAG | marks end of line in TI-Basic (not used in expressions) |
E9 | ENDSTACK_TAG | end of TI-Basic program (not used in expressions), or end of the expressions stack |
EA | PN1_TAG | expr +/- |
EB | PN2_TAG | expr1 expr2 +/- |
EC | ERROR_MSG_TAG | name error_message |
ED | EIGVC_TAG | mat eigVc |
EE | EIGVL_TAG | mat eigVl |
EF | DASH_TAG | expr ' (prime, i.e. expr') |
F0 | LOCALVAR_TAG | var _local_ (parameter/local variable reference) |
F1 | DESOLVE_TAG | [] depend_var indep_var equation deSolve |
F2 | FDASH_TAG | func_params func_name ' (prime, i.e. func_name'(func_params) |
F3 | ASM_TAG | ASM program tag (not used in expressions) |
F4 | ISPRIME_TAG | int isPrime |
F8 | OTH_TAG | Other file tag, for future expansions (not used in expressions) |
F9 | ROTATE_TAG | [count] list|int|string rotate |
01 | INDIR_TAG | string_expr # (indirection) |
02 | GETKEY_TAG | getKey |
03 | GETFOLD_TAG | getFold |
04 | SWITCH_TAG | [int] switch |
05 | UNITCONV_TAG | unit1 unit2 |> (unit conversion, unit1 |> unit2) |
06 | ORD_TAG | string ord |
07 | EXPR_TAG | string expr |
08 | CHAR_TAG | int char |
09 | STRING_TAG | expr string |
0A | GETTYPE_TAG | var getType |
0B | GETMODE_TAG | string getMode |
0C | SETFOLD_TAG | var setFold |
0D | PTTEST_TAG | y x ptTest |
0E | PXLTEST_TAG | column row pxlTest |
0F | SETGRAPH_TAG | string string setGraph |
10 | SETTABLE_TAG | string string setTable |
11 | SETMODE_TAG | string string setMode |
12 | FORMAT_TAG | [string] expr format |
13 | INSTRING_TAG | [start] substring search-string inString |
14 | APPEND_TAG | string2 string1 & (append) |
15 | DD_TAG | dmsnumber |>DD |
16 | EXPR2DMS_TAG | expr |>DMS |
17 | VEC2RECT_TAG | vec |>Rect |
18 | VEC2POLAR_TAG | vec |>Polar |
19 | VEC2CYLIND_TAG | vec |>Cylind |
1A | VEC2SPHERE_TAG | vec |>Sphere |
1B | PARENTH_START_TAG | ( (used only internally for the parser, not in expressions) |
1C | PARENTH_END_TAG | ) (used only internally for the parser, not in expressions) |
1D | MAT_START_TAG | [ (used only internally for the parser, not in expressions) |
1E | MAT_END_TAG | ] (used only internally for the parser, not in expressions) |
1F | LIST_START_TAG | { (used only internally for the parser, not in expressions) |
20 | LIST_END_TAG | } (used only internally for the parser, not in expressions) |
21 | COMMA_TAG | , (used only internally for the parser, not in expressions) |
22 | SEMICOLON_TAG | ; (used only internally for the parser, not in expressions) |
23 | COMPLEX_ANGLE_TAG | /_ (used only internally for the parser, not in expressions) |
24 | SINGLE_QUOTE_TAG | ' (used only internally for the parser, not in expressions) |
25 | QUOTE_TAG | " (used only internally for the parser, not in expressions) |
26 | POLCPLX_TAG | magnitude angle /_ (polar complex number) |
27 | TMPCNV_TAG | expr2 expr1 tmpCnv |
28 | DELTA_TMPCNV_TAG | expr2 expr1 _DELTA_tmpCnv |
29 | GETUNITS_TAG | getUnits |
2A | SETUNITS_TAG | list setUnits |
2B | BIN_TAG | int 0b (i.e. 0bint) |
2C | HEX_TAG | expr 0h (i.e. 0hexpr) |
2D | INT2BIN_TAG | int |>Bin |
2E | INT2DEC_TAG | int |>Dec |
2F | INT2HEX_TAG | int |>Hex |
30 | DET_TOL_TAG | tol mat det |
31 | REF_TOL_TAG | tol mat ref |
32 | RREF_TOL_TAG | tol mat rref |
33 | SIMULT_TOL_TAG | tol vec mat simult |
34 | GETCONFG_TAG | getConfg |
35 | V_AUGMENT_TAG | mat2 ; mat1 augment |
01 | X_BAR_TAG | x_bar_ |
02 | Y_BAR_TAG | y_bar_ |
03 | SIGMA_X_TAG | _SIGMA_x |
04 | SIGMA_X2_TAG | _SIGMA_x_^2_ |
05 | SIGMA_Y_TAG | _SIGMA_y |
06 | SIGMA_Y2_TAG | _SIGMA_y_^2_ |
07 | SIGMA_XY_TAG | _SIGMA_xy |
08 | SX_TAG | Sx |
09 | SY_TAG | Sy |
0A | SMLSIGMA_X_TAG | _sigma_x |
0B | SMLSIGMA_Y_TAG | _sigma_y |
0C | NSTAT_TAG | nStat |
0D | MINX_TAG | minX |
0E | MINY_TAG | minY |
0F | Q1_TAG | q1 |
10 | MEDSTAT_TAG | medStat |
11 | Q3_TAG | q3 |
12 | MAXX_TAG | maxX |
13 | MAXY_TAG | maxY |
14 | CORR_TAG | corr |
15 | R2_TAG | R_^2_ |
16 | MEDX1_TAG | medx1 |
17 | MEDX2_TAG | medx2 |
18 | MEDX3_TAG | medx3 |
19 | MEDY1_TAG | medy1 |
1A | MEDY2_TAG | medy2 |
1B | MEDY3_TAG | medy3 |
1C | XC_TAG | xc |
1D | YC_TAG | yc |
1E | ZC_TAG | zc |
1F | TC_TAG | tc |
20 | RC_TAG | rc |
21 | THETA_C_TAG | _THETA_c |
22 | NC_TAG | nc |
23 | XFACT_TAG | xfact |
24 | YFACT_TAG | yfact |
25 | ZFACT_TAG | zfact |
26 | XMIN_TAG | xmin |
27 | XMAX_TAG | xmax |
28 | XSCL_TAG | xscl |
29 | YMIN_TAG | ymin |
2A | YMAX_TAG | ymax |
2B | YSCL_TAG | yscl |
2C | DELTA_X_TAG | _DELTA_x |
2D | DELTA_Y_TAG | _DELTA_y |
2E | XRES_TAG | xres |
2F | XGRID_TAG | xgrid |
30 | YGRID_TAG | ygrid |
31 | ZMIN_TAG | zmin |
32 | ZMAX_TAG | zmax |
33 | ZSCL_TAG | zscl |
34 | EYE_THETA_TAG | eye_THETA_ |
35 | EYE_PHI_TAG | eye_PHI_ |
36 | THETA_MIN_TAG | _THETA_min |
37 | THETA_MAX_TAG | _THETA_max |
38 | THETA_STEP_TAG | _THETA_step |
39 | TMIN_TAG | tmin |
3A | TMAX_TAG | tmax |
3B | TSTEP_TAG | tstep |
3C | NMIN_TAG | nmin |
3D | NMAX_TAG | nmax |
3E | PLOTSTRT_TAG | plotStrt |
3F | PLOTSTEP_TAG | plotStep |
40 | ZXMIN_TAG | zxmin |
41 | ZXMAX_TAG | zxmax |
42 | ZXSCL_TAG | zxscl |
43 | ZYMIN_TAG | zymin |
44 | ZYMAX_TAG | zymax |
45 | ZYSCL_TAG | zyscl |
46 | ZXRES_TAG | zxres |
47 | Z_THETA_MIN_TAG | z_THETA_min |
48 | Z_THETA_MAX_TAG | z_THETA_max |
49 | Z_THETA_STEP_TAG | z_THETA_step |
4A | ZTMIN_TAG | ztmin |
4B | ZTMAX_TAG | ztmax |
4C | ZTSTEP_TAG | ztstep |
4D | ZXGRID_TAG | zxgrid |
4E | ZYGRID_TAG | zygrid |
4F | ZZMIN_TAG | zzmin |
50 | ZZMAX_TAG | zzmax |
51 | ZZSCL_TAG | zzscl |
52 | ZEYE_THETA_TAG | zeye_THETA_ |
53 | ZEYE_PHI_TAG | zeye_PHI_ |
54 | ZNMIN_TAG | znmin |
55 | ZNMAX_TAG | znmax |
56 | ZPLTSTEP_TAG | zpltstep |
57 | ZPLTSTRT_TAG | zpltstrt |
58 | SEED1_TAG | seed1 |
59 | SEED2_TAG | seed2 |
5A | OK_TAG | ok |
5B | ERRORNUM_TAG | errornum |
5C | SYSMATH_TAG | sysMath |
5D | SYSDATA_TAG | sysData |
5E | REGEQ_TAG | regEq (Name = null) |
5F | REGCOEF_TAG | regCoef |
60 | TBLINPUT_TAG | tblInput |
61 | TBLSTART_TAG | tblStart |
62 | DELTA_TBL_TAG | _DELTA_tbl |
63 | FLDPIC_TAG | fldpic (this tag is suspicious) |
64 | EYE_PSI_TAG | eye_PSI_ |
65 | TPLOT_TAG | tplot |
66 | DIFTOL_TAG | diftol |
67 | ZEYE_PSI_TAG | zeye_PSI_ |
68 | T0_TAG | t0 |
69 | DTIME_TAG | dtime |
6A | NCURVES_TAG | ncurves |
6B | FLDRES_TAG | fldres |
6C | ESTEP_TAG | Estep |
6D | ZT0DE_TAG | zt0de |
6E | ZTMAXDE_TAG | ztmaxde (Name = ztmax) |
6F | ZTSTEPDE_TAG | ztstepde (Name = ztstep) |
70 | ZTPLOTDE_TAG | ztplotde |
71 | NCONTOUR_TAG | ncontour |
01 | CLRDRAW_ITAG | ClrDraw |
02 | CLRGRAPH_ITAG | ClrGraph |
03 | CLRHOME_ITAG | ClrHome |
04 | CLRIO_ITAG | ClrIO |
05 | CLRTABLE_ITAG | ClrTable |
06 | CUSTOM_ITAG | Custom |
07 | CYCLE_ITAG | Cycle |
08 | DIALOG_ITAG | Dialog |
09 | DISPG_ITAG | DispG |
0A | DISPTBL_ITAG | DispTbl |
0B | ELSE_ITAG | Else (in If...Endif statement) |
0C | ENDCUSTM_ITAG | EndCustm |
0D | ENDDLOG_ITAG | EndDlog |
0E | ENDFOR_ITAG | displacement EndFor |
0F | ENDFUNC_ITAG | EndFunc |
10 | ENDIF_ITAG | EndIf |
11 | ENDLOOP_ITAG | displacement EndLoop |
12 | ENDPRGM_ITAG | EndPrgm |
13 | ENDTBAR_ITAG | EndTBar |
14 | ENDTRY_ITAG | displacement EndTry |
15 | ENDWHILE_ITAG | displacement EndWhile |
16 | EXIT_ITAG | Exit |
17 | FUNC_ITAG | Func |
18 | LOOP_ITAG | Loop |
19 | PRGM_ITAG | Prgm |
1A | SHOWSTAT_ITAG | ShowStat |
1B | STOP_ITAG | Stop |
1C | THEN_ITAG | Then |
1D | TOOLBAR_ITAG | Toolbar |
1E | TRACE_ITAG | Trace |
1F | TRY_ITAG | Try |
20 | ZOOMBOX_ITAG | ZoomBox |
21 | ZOOMDATA_ITAG | ZoomData |
22 | ZOOMDEC_ITAG | ZoomDec |
23 | ZOOMFIT_ITAG | ZoomFit |
24 | ZOOMIN_ITAG | ZoomIn |
25 | ZOOMINT_ITAG | ZoomInt |
26 | ZOOMOUT_ITAG | ZoomOut |
27 | ZOOMPREV_ITAG | ZoomPrev |
28 | ZOOMRCL_ITAG | ZoomRcl |
29 | ZOOMSQR_ITAG | ZoomSqr |
2A | ZOOMSTD_ITAG | ZoomStd |
2B | ZOOMSTO_ITAG | ZoomSto |
2C | ZOOMTRIG_ITAG | ZoomTrig |
2D | DRAWFUNC_ITAG | expr DrawFunc |
2E | DRAWINV_ITAG | expr DrawInv |
2F | GOTO_ITAG | expr Goto (Expr = LABEL) |
30 | LBL_ITAG | expr Lbl (Expr = LABEL) |
31 | GET_ITAG | var Get |
32 | SEND_ITAG | list Send |
33 | GETCALC_ITAG | var GetCalc |
34 | SENDCALC_ITAG | var SendCalc |
35 | NEWFOLD_ITAG | foldername NewFold |
36 | PRINTOBJ_ITAG | var PrintObj |
37 | RCLGDB_ITAG | var RclGDB |
38 | STOGDB_ITAG | var StoGDB |
39 | ELSEIF_ITAG | condition ElseIf |
3A | IF_ITAG | condition If (simple variant) |
3B | IFTHEN_ITAG | condition If...Then (If condition Then) |
3C | RANDSEED_ITAG | expr RandSeed |
3D | WHILE_ITAG | condition While |
3E | LINETAN_ITAG | point expr LineTan |
3F | COPYVAR_ITAG | var2 var1 CopyVar |
40 | RENAME_ITAG | newname oldname Rename |
41 | STYLE_ITAG | string expr Style |
42 | FILL_ITAG | var expr Fill |
43 | REQUEST_ITAG | var string Request |
44 | POPUP_ITAG | var itemlist PopUp |
45 | PTCHG_ITAG | y x PtChg |
46 | PTOFF_ITAG | y x PtOff |
47 | PTON_ITAG | y x PtOn |
48 | PXLCHG_ITAG | column row PxlChg |
49 | PXLOFF_ITAG | column row PxlOff |
4A | PXLON_ITAG | column row PxlOn |
4B | MOVEVAR_ITAG | newfolder oldfolder var MoveVar |
4C | DROPDOWN_ITAG | var list title_string DropDown |
4D | OUTPUT_ITAG | expr column row Output |
4E | PTTEXT_ITAG | y x string PtText |
4F | PXLTEXT_ITAG | column row string PxlText |
50 | DRAWSLP_ITAG | slope y x DrawSlp |
51 | PAUSE_ITAG | expr Pause |
52 | RETURN_ITAG | expr Return |
53 | INPUT_ITAG | [var] [string] Input |
54 | PLOTSOFF_ITAG | [9] ... [2] [1] PlotsOff |
55 | PLOTSON_ITAG | [9] ... [2] [1] PlotsOn |
56 | TITLE_ITAG | [label] string Title |
57 | ITEM_ITAG | [label] string Item |
58 | INPUTSTR_ITAG | var [string] InputStr |
59 | LINEHORZ_ITAG | [drawmode] y LineHorz |
5A | LINEVERT_ITAG | [drawmode] x LineVert |
5B | PXLHORZ_ITAG | [drawmode] row PxlHorz |
5C | PXLVERT_ITAG | [drawmode] column PxlVert |
5D | ANDPIC_ITAG | [pxlcol pxlrow] picvar AndPic |
5E | RCLPIC_ITAG | [pxlcol pxlrow] picvar RclPic |
5F | RPLCPIC_ITAG | [pxlcol pxlrow] picvar RplcPic |
60 | XORPIC_ITAG | [pxlcol pxlrow] picvar XorPic |
61 | DRAWPOL_ITAG | [theta_step] [theta_max] [theta_min] DrawPol |
62 | TEXT_ITAG | string Text |
63 | ONEVAR_ITAG | [L4] [L3] [L2] [L1] OneVar |
64 | STOPIC_ITAG | [height width] [pxlcol pxlrow] var StoPic |
65 | GRAPH_ITAG | [var2] [var1] [expr2] expr1 Graph |
66 | TABLE_ITAG | [var] [expr2] expr1 Table |
67 | NEWPIC_ITAG | [maxcol] [maxrow] picvar mat NewPic |
68 | DRAWPARM_ITAG | [tstep] [tmax] [tmin] expr2 expr1 DrawParm |
69 | CYCLEPIC_ITAG | [direction] [cycle] [wait] N picname_string CyclePic |
6A | CUBICREG_ITAG | [[L5 L4] [L3]] L2 L1 CubicReg |
6B | EXPREG_ITAG | [[L5 L4] [L3]] L2 L1 ExpReg |
6C | LINREG_ITAG | [[L5 L4] [L3]] L2 L1 LinReg |
6D | LNREG_ITAG | [[L5 L4] [L3]] L2 L1 LnReg |
6E | MEDMED_ITAG | [[L5 L4] [L3]] L2 L1 MedMed |
6F | POWERREG_ITAG | [[L5 L4] [L3]] L2 L1 PowerReg |
70 | QUADREG_ITAG | [[L5 L4] [L3]] L2 L1 QuadReg |
71 | QUARTREG_ITAG | [[L5 L4] [L3]] L2 L1 QuartReg |
72 | TWOVAR_ITAG | [[L5 L4] [L3]] L2 L1 TwoVar |
73 | SHADE_ITAG | [patres] [pat] [xhigh] [xlow] expr2 expr1 Shade |
74 | FOR_ITAG | [step] high low var For |
75 | CIRCLE_ITAG | [drawmode] r y x Circle |
76 | PXLCRCL_ITAG | [drawmode] r col rowPxlCrcl |
77 | NEWPLOT_ITAG | [bucket [mark] [inc] [cat] [frq] [ylist] xlist type N NewPlot |
78 | LINE_ITAG | [drawmode] yend xend ystart xstart Line |
79 | PXLLINE_ITAG | [drawmode] colend rowend colstart rowstartPxlLine |
7A | DISP_ITAG | [[...] expr1] Disp |
7B | FNOFF_ITAG | [9] ... [2] [1] FnOff |
7C | FNON_ITAG | [9] ... [2] [1] FnOn |
7D | LOCAL_ITAG | [[...] var1] Local |
7E | DELFOLD_ITAG | [[...] var1] DelFold |
7F | DELVAR_ITAG | [[...] var1] DelVar |
80 | LOCK_ITAG | [[...] var1] Lock |
81 | PROMPT_ITAG | [[...] var1] Prompt |
82 | SORTA_ITAG | [[...] list1] SortA |
83 | SORTD_ITAG | [[...] list1] SortD |
84 | UNLOCK_ITAG | [[...] var1] UnLock |
85 | NEWDATA_ITAG | [[...] list1] datavar NewData |
86 | DEFINE_ITAG | expr var|userfunc Define |
87 | ELSE_TRY_ITAG | condition Else (in Try...EndTry statement) |
88 | CLRERR_ITAG | ClrErr |
89 | PASSERR_ITAG | PassErr |
8A | DISPHOME_ITAG | DispHome |
8B | EXEC_ITAG | [[...] expr] string Exec |
8C | ARCHIVE_ITAG | [[...] var1] Archive |
8D | UNARCHIV_ITAG | [[...] var1] Unarchiv |
8E | LU_ITAG | [tol] pvar uvar lvar mat LU |
8F | QR_ITAG | [tol] rvar qvar mat QR |
90 | BLDDATA_ITAG | var|sysdata BldData |
91 | DRWCTOUR_ITAG | expr DrwCtour |
92 | NEWPROB_ITAG | NewProb |
93 | SINREG_ITAG | [[L4 L3] [period] [iter]] L2 L1 SinReg |
94 | LOGISTIC_ITAG | [[L4 L3] [period] [iter]] L2 L1 Logistic |
95 | CUSTMON_ITAG | CustmOn |
96 | CUSTMOFF_ITAG | CustmOff |
97 | SENDCHAT_ITAG | var SendChat |
ti_float
is an alias name for standard ANSI float
type, introduced to keep backward compatibility with previous releases of the TIGCC compiler,
which don't support standard ANSI floats. See bcd for more info about
internal organization of floating point values.
bcd
is a structure which represents the internal structure of floating point values.
It is defined as
typedef struct { unsigned short exponent; unsigned long long mantissa; } ti_float;Note that long long is not a typing error: it is a GNU C extension for representing very long integers (8-byte integers in this implementation). See description of bcd type in the documentation for timath.h header file for more info about the internal organization of floating point values.