Em 12/3/2012 06:15, Tamas Rudnai escreveu: > On 12 March 2012 07:50, RussellMc wrote: > >> Can you see WHY the first version does not =3D "9" if it doesn't. >> It's because the scope of the "/" operator does not extend beyond the >> following number (here =3D 2) whereas all solutions that obtain "1" as >> an answer do not meet this requirement. >> > The OP was about not to type the multiplication sign it > > 6 / 2 ( 1 + 2 ) > > This should be 'syntax error' as someone suggested, but instead in many > calculator the '2' before the bracket is ignored it seems (at least on th= e > iPhone). Therefore 6 / (1 + 2 ) interpreted only giving a result of 2. If > you type the '*' in between the '2' and the bracket then of course you ge= t > '9' on iPhone. > > Tamas As I commented before, if I press =3D again after receiving the wrong answer (1) in Windows Calc, to repeat the last operation, the result is 0.6666...67. That means that the calculator thinks the last operation it executed was a divide by 3. I have a theory that the input of "(1+2)" without an operator replaces the working register (or whatever the programmer calls it) without replacing or invalidating the active operator. When someone presses =3D,the calculator simply does the operation it thinks that is outstanding. Let's say the calculator has three internal variables X, Y and Op. Y holds the value of previous calculations, X holds the value just entered and Op holds the operation. When =3D is pressed, it simply does the calculation and replaces the Y register with the result. You can press =3D how many times you like and the same last operation and value of X are uses again. Perhaps when the "(1+2)" is input, the calculator replaces X with its result, leaving Op untouched. Isaac --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .