View Full Version : Calling all math geniuses.....


winwintoo
01-31-2003, 08:36 PM
I'm programming a calculator for the web site that I'm building and I've run into some logic problems.

On the desktop calculator on my Mac, the following sequence of entries resolves to 200; the $4 calculator in my kitchen drawer resolves the same sequence to 100.

Here's the sequence: 1, 0, 0, +/-, +/-, / (division), =.

I think the correct answer is 100 (the user could randomly click buttons and only the last one pushed would be applied.

Can anyone clear this up for me??

Thanks, Margaret

jeaniesa
02-01-2003, 01:08 AM
I get the same thing as Chuck on my PC desktop calculator.

I can't check a physical calculator, because all I can find at the moment are my HP reverse-polish-notation ones (they don't have an "=" button ;) ).

Jeanie

winwintoo
02-01-2003, 07:11 AM
Thanks Chuck and Jeannie - I left out a "+" in my example - and thats what gave me the 200, but your explanation works for me.

Using your sequence, I do get "1" as the answer on my iBook calculator, but on my $4 one I get "0.01" - I guess the $4 one is mathmatecally challenged :(

Take care, Margaret

winwintoo
02-01-2003, 07:55 AM
Continuing my research, I entered this sequence:

452
/
5
%
=

iBook calculator answer: 20 (5% of 452 is 22.6 so 452 divided by 5% - or 22.6 - equals 20)

$4 calculator answer: 9040 (which is 20*452)

standard calculator at http://www.calculator.com/ answer: 9040 (this calculator displays 0.05 after you enter the % sign so 452*.05=9040)

I think we should stop using calculators.

:bawling:

Take care, Margaret

dcarr
02-01-2003, 10:44 AM
Margaret,
Your $4 calculator may not calculate answers using standard order of operation, many small calcs do not. The computer calc is probably following the order.
Anybody remember "Please Excuse My Dear Aunt Sally?" :)
Debbie

BigAl
02-01-2003, 12:00 PM
Remember 5% is 0.05
so 452/0.05 must be a bigger number than 452 (much bigger).

1/0.05 = 20

452/0.05 = 452* 1/0.05 = 452*20=9040

your $4 calculator is correct.

5% of 452 = 5% * 452 = 0.05 * 452 = 22

so the iBook calculator is correct.

It's all a question of mathematical semantics.

I can't quite figure out what you're trying to do with your first sum.

winwintoo
02-01-2003, 12:48 PM
Thanks for the feedback Al. The first calculation that I posted was just an experiment to see how different calculators handled a series of seemingly random button clicking.

I then started paying more attention to what I was entering and began to notice differences in how the calculators performed.

There's quite a difference between a result of "20" and a result of "9040" - as a casual, not very mathmetically inclined individual, how would I know which is correct. Makes me wonder what other mistakes these calculators are making.

I wonder which one my pension investment handlers are using :bawling: :bawling:

Take care, Margaret