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

Re: kcalc math bug?



Mike Fedyk wrote:
> On Sat, Mar 30, 2002 at 12:43:52AM +0100, Vincent Lefevre wrote:
> > On Fri, Mar 29, 2002 at 15:33:36 -0800, Mike Fedyk wrote:
> > > Package: kcalc
> > > Priority: optional
> > > Section: utils
> > > Installed-Size: 392
> > > Maintainer: Debian QA Team <packages@qa.debian.org>
> > > Architecture: i386
> > > Source: kdeutils
> > > Version: 4:2.2.2-5
> > >
> > > run these calculations:
> > >
> > > 1x2+5x50 (in this order, not in normal precedence order that
computers and
> > > etc use...)
> > >
> > > And it outputs 252 not 350!
> >
> > It should be 252 anyway. Any calculation tool should use the
> > conventional precedence.
>
> 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.

And 252 is what I get on my $20CDN (~$10US) calculator. If you want 252,
remember BEDMAS.

> 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...

And hand entered calculations on my calculator are calculated in the
proper order, contrary to what you would want. It looks like you wanted
left-to-right operator precedence rather than using order of operations.

Seneca
seneca@slemish.com


-- 
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: