EasyManuals Logo
Home>Texas Instruments>Calculator>TI-89

Texas Instruments TI-89 Tip List

Texas Instruments TI-89
507 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #305 background imageLoading...
Page #305 background image
pid()tmp
if mid(tmp,4,3)="0-0":return 1.0
if mid(tmp,4,3)="0-1":return 1.01
if mid(tmp,4,3)="1-3":return 1.05
return 0
endfunc
Frank also offers these comments on his code:
"In most cases none of this will be necessary. In the rare case that it is, it will probably be more useful
to incorporate fragments into a single function or program making the overall code much smaller.
I claim no rights to any of this code, it is all public domain.
There doesn't appear to be any way to determine hardware version programatically."
(Credit to Frank Westlake and Lars Fredericksen)
[7.15] Avoid For ... EndFor loops
Loops are very slow on the 89/92+. The 89/92+ provide some functions which can be used to
accomplish some operations that are traditionally done with loops:
! use PolyEval() to evaluate polynomials
! use seq() to generate a list of function values
! use sum() to add the elements of a list
! use sigma (Σ) to sum the values of an expression
! use upper-case pi (‹) to find the product of expression terms
! the common arithmetic operators (+, -, *, /, etc) operate on lists & matrices
! the 'dot operators' (.-, .*, ./, .^) operate on matrices and expressions
! the submat() function extracts part of a matrix
[7.16] Use when() instead of if...then...else...endif
The 92+ manual describes using when() only to create discontinuous graphs, however, it is much more
useful than that. It can be used in place of the if...endif construction, and is more compact.
when() functions can also be nested to create an if...then...else..endif structure. Suppose you have four
functions f1(x), f2(x), f3(x) and f4(x). You want to evaluate the functions on intervals like this:
f1(x) when x < 1
f2(x) when x>= 1 and x < 2
f3(x) when x>= 2 and x < 3
f4(x) when x >= 3
The If...EndIf version looks like this:
if x < 1 then
f1(x)
elseif x≥1 and x<2 then
f2(x)
7 - 16

Table of Contents

Other manuals for Texas Instruments TI-89

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments TI-89 and is the answer not in the manual?

Texas Instruments TI-89 Specifications

General IconGeneral
Display size (HxV)100 x 160 mm
Memory type639K FLASH ROM, 188K bytes RAM
Compatible operating systemsOperating System 2.09
Battery typeAAA

Related product manuals