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 #370 background imageLoading...
Page #370 background image
in the code.
Some examples:
grpfrc(1.23456789012,3) returns "1.234 567 890 12 E0"
grpfrc(1.23456789012,4) returns "1.2345 6789 012 E0"
grpfrcan() returns "1.414 213 562 37 E0"
when 1.41421356237 is the first item in the history display
My examples show the exponent 'E0' because I had the Exponent mode set to Engineering, but these
routines work for any Exponent mode setting.
The code for grpfrc():
grpfrc(x,g)
func
©grpfrc() - Group fraction digits
©12 May 99/dab
©dburkett@infinet.com
©x: number to format
©g: number of fraction digits in group
local n,dp,el,ex,mn,fn,f1
©Convert argument to string
string(x)n
©Initialize exponent string
""ex
©Find decimal point and , if any
instring(n,".")dp
instring(n,"")El
©Get exponent or set end of string
if El0 then
right(n,dim(n)-El+1)ex
else
dim(n)+1El
endif
©Get mantissa & fraction strings
left(n,dp)mn
mid(n,dp+1,El-dp-1)fn
©Separate fraction digits with space
""f1
while dim(fn)>g
f1&left(fn,g)&" "f1
right(fn,dim(fn)-g)fn
endwhile
©Build & return final result
mn&f1&fn&" "&ex
Endfunc
9 - 11

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