Texas Instruments TI89 Developer Guide - Page 228
Complex Numbers, Appendix A: System Routines - EStack Arithmetic
![]() |
UPC - 033317198566
View all Texas Instruments TI89 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 228 highlights
186 Chapter 16: Working with Numbers 16.7. types that can be added. The primary system routines for estack arithmetic are push_sum, push_difference, push_product, push_ratio, and push_exponentiate. Rational values combine to form rational values unless the operation overflows or underflows. Since the float range is larger than the rational range, rational operations quietly overflow and underflow into float values. Float values combine to form float values. Float operations overflow to the correctly signed symbolic infinity. Rational values combine with float values to form float values. The rational values are converted to float values to facilitate these combinations. In addition to the primary routines, the system provides some specialized routines. replace_top2_with_sum, replace_top2_with_difference, replace_top2_with_prod, replace_top2_with_ratio, and replace_top2_with_pow perform the corresponding operation on the top two entries on the expression stack. add_to_top, subtract_from_top, times_top, divide_top, and raise_to_top perform the corresponding operation with the top entry on the estack and a specified input argument. See Appendix A: System Routines - EStack Arithmetic for descriptions of these and other routines for performing arithmetic operations on the expression stack. Complex Numbers The representation of complex values is different in the external and internal tokenized forms. The external tokenized form uses the I_TAG which represents the imaginary number. So, 1 + 2i tokenizes into an expression involving tagged integers, addition, multiplication, and the I_TAG. Since the I_TAG might appear anywhere in a general expression, this representation makes it difficult to recognize and operate on complex values. The simplifier, via push_internal_simplify, converts complex values to internal tokenized form which uses an IM_RE_TAG on top of the imaginary part on top of the real part of the complex value. This form places the knowledge that the value is complex at the top of the representation in the form of the IM_RE_TAG. This change greatly facilitates recognizing and operating on complex values. External tokenized values are only handled by push_internal_simplify, which converts them to internal form, and by push_simplify_statements and push_simplify, which use push_internal_simplify. Do not pass external tokenized form to other evaluation/simplification routines. External tokenized values are also handled by the display routines; for example, display_statements, Parse1DExpr, etc. TI-89 / TI-92 Plus Developer Guide Not for Distribution Beta Version January 26, 2001
![](/manual_guide/products/texas-instruments-ti89-developer-guide-95b636f/228.png)