Re: TI-M: TI-89 root question
[Prev][Next][Index][Thread]
Re: TI-M: TI-89 root question
Well I think the bottom line with this discussion is that the prescedence
is arbitrary in reality. There is many slightly different conventions,
and the best way to deal with these is to either be aware of the exact
rules of the expression parser in question or avoid confusion by adding
grouping.
-Andy
--
Andy Selle <aselle@ticalc.org>
Programming and System Administration, Survey Editor, Accounts Manager
the ticalc.org project - http://www.ticalc.org/
On Thu, 8 Jun 2000, Scott Noveck wrote:
>
> > On the TI calculators while x^n has highest prescedence. x^a^b^c^d... etc
> > sequece is evaluated left to right. The HP48X does the same for algebraic
> > evaluation.
>
> That is NOT true, and I'd advise you to check before generalizing like that.
> On _SOME_ TI calculators - NOT ALL! - and the HP48X line it is evaluated
> left to right. This gives the WRONG answer, on the z80 calcs, but it's
> taken as right associative on the 68k calcs and evaluated properly.
>
> > At the TI web site it is recommend that such should be put in parenthesis.
> > So 4^2^3 should be witten as (4^2)^3 or 4^(2^3) if that is how you want it
> > evaluated.
>
> That's just TI covering up for their mistake =)
>
> > Also the TI-82, TI-85 will evaluate a 10/2A, A being equal to 3, as
> > 1.666.... Where as the TI-83, TI-83+, TI-86, TI-92, TI-92+, TI_89 as 15.
> > The TI-82, TI-85 parsed as one might write an implied multipication in a
> > division. The other TI's interpret 10/2A the same as 10/2*A.
>
> FYI - and I know a lot of people here will argue this point with me and have
> a hard time accepting it (as did I) - the relative precedence of
> multiplication and division is not defined. IE, neither of those answers -
> 1.666... and 15 - is any more "correct" than the other.
>
> Most all schools teach PEMDAS for the basic precedence laws; however, some
> teach that multiplication comes _before_ parentheses, and some teach that
> they're both done _at the same time_. I myself have always been taught the
> latter - that they have equal precedence and are evaluated left to right, as
> newer calcs default to. Yet I have heard of many textbooks that teach that
> multiplication always comes before division.
>
> There was a large debate over this on news://sci.math a few months back.
> Apparently, from what I gathered from some college professors, the majority
> concensus used to be that multiplication had a higher precedence, unlike how
> the new CAS's evaluate it. The major turning point was the onset of the
> computer language Fortran, which gave both equal precedence. Most later
> languages, including BASIC and C/C++, have followed in suit and it is
> generally believed that the majority today gives equal precendence, too.
>
> I'm no real authority myself, so I could be wrong, but I figure it's an
> interesting little factoid nonetheless.
>
> > TI recommens the use of the parenthesis to avoid ambiguity.
>
> This time, they're correct. AFAIK, when it comes to powers, they are not.
>
> -Scott
>
>
>
References: