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 b
≠
0 then
right(str,dim(str)-b)
→
t
Return s*(exact(iPart(expr(str)))+exact(expr(t))/
1
0^(dim(t)))
else
return exact(expr(str))
EndIf
EndFunc
The argument is passed as a string, for example
stoexact("
1
.23456789098765432
1
")
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
Содержание TI-92+
Страница 52: ...Component side of PCB GraphLink I O connector detail 1 41...
Страница 53: ...LCD connector detail PCB switch side 1 42...
Страница 54: ...Key pad sheet contact side Key pad sheet key side 1 43...
Страница 55: ...Key cap detail 1 44...
Страница 57: ...Component side of PCB with shield removed A detail view of the intergrated circuits 1 46...
Страница 59: ...Keypad rubber sheet key cap side Inside front cover showing keycaps in place Detail of a key cap 1 48...
Страница 410: ...void extensionroutine2 void Credit to Bhuvanesh Bhatt 10 4...