RE: A92: quirks


[Prev][Next][Index][Thread]

RE: A92: quirks



The answer to your question about calling functions and argument names:
The manual (or for some users, an addendum to the manual that came in the 
package; apparently even TI made the mistake when writing the manual) says 
that you can't use as an argument the same variable that contains the argument 
in the function. So if you wrote a function, and in the program editor, it 
looks like "testfunc(x,y,z)", you could execute it with arguments like 
testfunc(1,2,a) but not testfunc(x,y,z). I think the reason is because the 
variables have the same name, so they conflict. The TI-92, internally, tries 
to store x to the variable x so it can evaluate the function, but that causes 
a circular definition error.
________________

Jeff Tyrrill
http://tyrrill-ticalc.home.ml.org/
http://ti-files.home.ml.org/


-----Original Message-----
From:	owner-assembly-92@lists.ticalc.org  On Behalf Of Andrew Sieber
Sent:	Saturday, July 26, 1997 6:16 PM
To:	Assembly-92 mailing list
Subject:	A92: quirks

I bought a TI-92 ten days ago and I've got some questions about its
correctness.  It's possible that I simply misunderstand the 92's
operation, or I've forgotten something about the underlying math.  My
ROM version is 1.11 and my complex mode is set to rectangular. 
Exact/approx mode is set to Exact.

1st question:
(2i)^2 yields "-4", as expected.  However, solve(x^2=-4,x) yields
"false", whereas the correct result (I think) is "2i or -2i". 
Similarly, solve(x=sqrt(-4),x) yields "false", whereas I believe it
should be "2i".  Why?

2nd question:
exact(.5) yields "1/2".
exact(1/2) yields "1/2".
approx(.5) yields ".5".
approx(1/2) yields ".5".
Therefore, exact(approx(.5)) should yield "1/2", and approx(exact(.5))
should yield ".5".  However, the calculator yields the opposite result
in both cases.  Why?

3rd question:
There is a tip on page 213 of the manual which says, "Use two or more
character argument names (xx, yy, xtemp, ...) to define function or
program arguments to prevent circular definitions when calling the
function or program."  And on page 389, in the documentation for
"Define", there is this:  "The argument names are placeholders; you
should not use those same names as arguments when you use the function."
Why?

I also have some general questions about the design of the 92:
1. Why is the window editor an "application", and not simply a pop-up
window accessible from the graphing application, and possibly from the
y= editor?
2. Why is there no word-wrap in the text editor?  With all of the
features of the 92, word wrap seems like a pretty elementary feature. 
Code to support it would not occupy significant ROM space, nor would
such code be difficult to write.
3. Fractional values which are exactly expressible in binary floating
point notation (such as 1/4) are always exactly expressible in decimal
floating point notation, but the reverse is not always true (ie. 1/5). 
Therefore, storing floating point numbers internally as decimal rather
than binary has accuracy advantages, especially since the user interface
(and humans) use decimal rather than binary.  Thus it was a smart move
for TI to include support for internal decimal numbers.  However, there
is a speed tradeoff in calculations; binary is faster.  As I understand
it, all of the 92's internal calculations are done in decimal, including
the graph-plotting calculations.  However, any accuracy advantages of
using decimal instead of binary are lost when plotting a graph.  Decimal
calculations are slower than their binary equivalents.  When plotting,
the calculator must determine which pixels on the screen to activate to
show the graph of the function which the user has entered.  The longer
it takes to calculate which pixels to activate, the longer the user must
wait to view the graph.  Extreme decimal precision is not needed for
this task; binary calculations may be less exact, but either way the
results are rounded to the nearest pixel.  The TI-85 uses binary
calculations for graphing (I think), and it is quite capable of showing
graphs correctly.  Why then does the 92 internally use decimal
calculations when plotting graphs?

Yes, these questions are related to assembly language programming (some
of them, at least); I may decide to write assembly language text editing
and graphing programs to partially replace the built in ones, and the
reasons that TI did not build in word wrap or binary graphing
calculations may prove useful.
Ok, that's a stretch.  The real reason for posting these questions to
the A92 list vs. somewhere else is because I was told that I have the
best chance of getting questions answered here vs. somewhere else.
Any answers that can be provided will be greatly appreciated.

--Andrew Sieber
asieber@usa.net



Follow-Ups: