Log in

30 December 2011 @ 10:21 pm
TI 84 calculator oddity (or maybe error)  
I was doing something related to Fermat primes, and noticed that my TI-84's interpretation of 2^2^5+1 isn't 4294967297 as I'd expect (famously divisible by 641), but rather 1025: It's interpreting it as ((2^2)^5)+1. How'd they get the order of operations wrong there?
jon_leonardjon_leonard on December 31st, 2011 07:33 pm (UTC)
Yes... Though to my way of thinking, that's about equivalent to "Some calculators get it wrong."

It seems more likely that they just implemented a fairly simple expression parser, and treated all the same-precedence operators as left-associative. That doesn't matter for addition and multiplication, and it's right for division and subtraction. But it's wrong for exponentiation.