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 #167 background imageLoading...
Page #167 background image
Setting constraints on a and b may result in a more simple expression.
(Credit to Glenn Fisher)
[6.9] Convert floating-point numbers to exact fractions
The usual method to convert a floating-point number n to an exact fraction is to use exact(n). However,
this function will only work for numbers smaller that the 14-digit precision of the 89/92+. For example,
exact(1.234567890123456) results in 6172839450617/5000000000000, which is actually
1.23456789012; the ...3456 from the original number has been lost.
This program can be used to convert arbitrarily long floating point numbers to exact fractions.
stoexact(str)
Func
©Convert string argument to exact number
Local b,t,s
sign(expr(str))s
if inString(str,"")=1
right(str,dim(str)-1)str
inString(str,".")b
If b0 then
right(str,dim(str)-b)t
Return s*(exact(iPart(expr(str)))+exact(expr(t))/10^(dim(t)))
else
return exact(expr(str))
EndIf
EndFunc
The argument is passed as a string, for example
stoexact("1.234567890987654321")
returns 1234567890987654321/10000000000000000000.
This function works for positive and negative arguments, but does not support exponential notation.
(credit for original idea & core code to Kenneth C. Arnold)
[6.10] Exact solutions to cubic and quartic equations
The 89/92+ functions csolve() and czeros() will not always return exact solutions to cubic and quartic
equations. The routines cubic() and quartic() can be used to get the exact solutions.
cubic():
cubic(é,ý)
6 - 9

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