These programs were written by frequent visitors to TI's discussion groups to provide for a frequently requested feature that the calculators do not have.
For the TI-8x
"/=" is the NOT EQUAL test operator. The hyphens in the last two lines of the programs are the negative sign, not the minus sign. When keying this in, do NOT include the lines that begin with "@". These were written for the TI-85/86, but the conversion to TI-83 family format is minimal. The main changes would be to switch to single letter variable names, use Str variables for the strings, and use = instead of = = for comparisons.
RTOSF - Real to string (fixed)
Converts the input real FX to the output string SF in base BS.
BS (the output base) can be from 2 to 16.
Inputs:
FX - the real number to be converted
BS - the base for the conversion (2 - 16)
Output:
FS - a string of ascii digits.
PROGRAM:RTOSF @ initialize the conversion string NS :"0123456789ABCDEF"NS @ Figure out the sign and save in SF @ If it's zero, just return "0" in FS. :sign FXSF :If SF==0 :Then :"0"FS :Return :End @ Non-zero, initialize FS to blank. :" "FS @ Figure out how many digits in front of decimal point. :int((ln abs FX)/ln BS)I @ Set TF to the part in front of decimal point. :iPart abs FXTF @ Convert TF to a string in the proper base. :Repeat I<0 :int (TF/(BS^I))T :TF-(T*(BS^I))TF :FS+sub(NS,T+1,1)FS :I-1I :End @ Now handle fractional part of FX :fPart abs FXTF @ If TF is NOT EQUAL to zero then add the decimal point. :If TF/=0 :FS+"."FS @ Now add digits until it's time to quit. :While TF/=0 and (lngth FS)<18 :TF*BSTF :FS+sub(NS,(iPart TF)+1,1)FS :fPart TFTF :End @ Remove that initial blank we intialized FS with. :sub(FS,2,(lngth FS)-1)FS @ Add the sign to the front of FS. :If SF==-1 :"-"+FSFS
RTOSE: A program to convert a real to a "float string".
This program uses the above "RTOSF" program.
Input:
RL - Real number to be converted.
BS - Base for output representation.
Output:
RS - Real string.
PROGRAM:RTOSE @ If the input is zero, just return it. :If RL==0 :Then :"0"RS :Return :End @ Save the sign in SN :sign RLSN @ Remove the sign from the mantissa. :abs RLMN @ figure out the exponent. :int log MNEX @ If it's more than seven digits, use float, else fixed. :If abs EX>7 :Then :MN/(10^EX)MN :Else :0EX :End @ Convert mantissa to fixed string :MNFX :RTOSF :FSRS @ If not doing fixed, convert exponent. :If EX/=0 :Then :RS+"e"RS :EXFS :RTOSF :RS+FSRS :End @ Now put sign on front of RS. :If SN==-1 :"-"+RSRS
For the TI-89 family
This takes ALL the work out of finding and displaying nth roots.
CustmOn and CustmOff are 89 Flash family commands only, omit them on the 92.
nroot(z,n) Prgm Local i,rad newlist(n)anglesr getmode("ALL")premode setmode({"Graph","FUNCTION","Display Digits","FLOAT","Angle","RADIAN","Exact/Approx","AUTO"}) cZeros(x^n-z,x)answer abs(answer)[1]length angle(z)rad If rad<0 rad+2*pirad rad/nrad For i,1,n 2*pi*(i-1)/n+radanglesr[i] EndFor anglesr*180/pianglesd Custom Title "answer" Title "length" Title "anglesR" Title "anglesD" Title ">Polar" Title "restore()" EndCustm CustmOn EndPrgm
This next program must be in the same directory as nroot:
restore() Prgm ClrHome setMode(premode) Delvar answer,length,anglesr,anglesd,premode CustmOff EndPrgm
For the TI-89 family
Here's a function that can calculate implicit derivatives of any degree. It's basically a variation on the routine from SoftWarehouse, it accepts expressions as well as equations.
:impdifn(u,x,y,n) :Func :Local e,e1,i :If part(u,0)="=" :left(u)-right(u)u :-d(u,x)/(d(u,y))e1 :e1e :1i :Loop :If i=n :Exit :d(e,x)+e1*d(e,y)e :1+ii :EndLoop :factor(e) :EndFunc
Where 'd' is the differential operator.
'u' may be either an expression or an equation. 'x' is the independent variable and 'y' the dependent
variable. 'n' is the degree of differentiation. An example is to enter
impdif(x^4+y^4=1,x,y,2).
The answer given is:
(-3*x^2*(x^4+y^4))/y^7
Since we know that x^4+y^4 =1, the answer can be simplified to -3*x^2/y^7.