Texas Instruments TI89 Developer Guide - Page 214
Most Main Ordering and Internal Representations of Exponentiation, Multiplication, and Addition
UPC - 033317198566
View all Texas Instruments TI89 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 214 highlights
172 Chapter 15: Expressions and The Expression Stack 15.4. • XOR_TAG, which represents the exclusive-or operator xor, is replaced by an equivalent expression using the and operator and the or operator. Thus, a xor b is replaced by not a and b or a and not b. • The tags representing transformation functions, such as factor( ) (FACTOR_TAG), expand( ) (EXPAND_TAG), and so on, never appear in the internal tokenized form. Calculator users prefer to see results in a more standard form, for example, x N y rather than x + (L1 † y) and a / b rather than a * (b^(L1)). Therefore, the system provides a routine called replace_top_with_post_simplified to transform internal tokenized form to external tokenized form. CHS_TAG, SUBTRACT_TAG, DIVIDE_TAG, E_TAG, SINH_TAG, COSH_TAG, TANH_TAG, SIN_TAG, COS_TAG, TAN_TAG, and I_TAG are restored where they make the result more readable. System routines typically accept only one tokenized form as input and produce only one tokenized form as output. Applications must not pass external tokenized form to a routine that expects internal tokenized form and must not pass internal tokenized form to a routine that expects external tokenized form. The external only tags listed above may cause an internal only routine to throw errors or may cause unexpected behavior. Similarly, internal only tags such as EXP_TAG, SIN2_TAG, and IM_RE_TAG will cause an external only routine to throw errors or behave unexpectedly. Appendix A: System Routines describes many entry points that operate on tokenized expressions. Each of the entry point descriptions specifies the acceptable input form and the output form that is returned. Most Main Ordering and Internal Representations of Exponentiation, Multiplication, and Addition Another important aspect of internal tokenized form is ordering. When the elements of an expression can be reordered, the simplifier does so using most main ordering. Some of the aspects of most main ordering are: • Single alphabetic variables are ordered r > s > t . . . > x > y > z > a > b . . . > p > q. • Single alphabetic variables are more main than other variables. Thus, x is more main than y, but y is more main than xx. • Single nonalphabetic variables and multicharacter variables are ordered by ASCII sequence. Thus, z is more main than a, but aa is more main than zz. • Variables are more main than symbolic constants such as π. • Symbolic constants are more main than numbers. See the description of the system routine compare_expressions for more information on most main ordering. TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001