# Re: kcalc math bug?

```On Fri, Mar 29, 2002 at 04:05:22PM -0800, Mike Fedyk wrote:

> > > 1x2+5x50 (in this order, not in normal precedence order that computers and
> > > etc use...)
> > >
> > > And it outputs 252 not 350!
>
> NO. Not if I enter it in a specific order.
>
> 1x2 = 2
>
> 2+5 = 7
>
> 7x50 = 350
>
> Not 252!
>
> That is how a calculator should work when you are typing in the calculation
> by *hand*!  I shouldn't have to worry about precedence then.
>
> This app is supposed to replace the calculator I can buy for \$10.  And that
> is how it should work.
>
> Remember, we are working with hand entered calculations that go into the app
> in a certain order, and *that* is the order that it should be calculated...

_Any_ calculator that isn't a piece of crap will follow the standard precedence rules.
Those rules _must_ be obeyed otherwise the real numbers that everyone loves so much
would not even form a field [this will probably not mean anything to you but...]

If you want 1*2+5*50 to be equal to 350 then enter is as (1*2+5)*50=7*50=350

AFAIK, a \$5 calculator will follow precedence..

I hope you realize your error by now..