### Welcome, Unregistered.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 10-Apr-2011, 23:03 #1 Kaotik yes, i'm drunk   Join Date: Apr 2003 Posts: 4,800 Many calculators not following math rules? And it's a damn simple equation too: 48 / 2 ( 9 + 3 ) Basic math rules say that you first calculate things within parenthesis (if there's more than one, you start from possible parenthesis inside another parenthesis etc), multiplying and dividing are equal and done in order from left to right. Also since there's parenthesis next to number without anything between them, they're multiplied. So the above equation goes like this: 48 / 2 ( 9 + 3 ) = 48 / 2 ( 12 ) = 24 ( 12 ) = 24 * 12 = 288 However, some calculators count it like this: 48 / 2 ( 9 + 3 ) = 48 / 2 ( 12 ) = 48 / 24 = 2 Strangely enough, some people are quite convinced the latter way should be correct, and not the former. Here's wolfram alphas take on it: http://www.wolframalpha.com/input/?i=48/2(9%2B3) And examples where calculators fail or do it right: __________________ I'm nothing but a shattered soul... Been ravaged by the chaotic beauty... Ruined by the unreal temptations... I was betrayed by my own beliefs... Last edited by Kaotik; 10-Apr-2011 at 23:36. Reason: Fixed typo in wolframalpha url too
 10-Apr-2011, 23:16 #2 3dcgi Senior Member   Join Date: Feb 2002 Posts: 2,019 Strange that not all Casios are the same. I assume you meant multiplying and dividing are equal even though you wrote subtracting.
10-Apr-2011, 23:27   #3
Kaotik
yes, i'm drunk

Join Date: Apr 2003
Posts: 4,800

Quote:
 Originally Posted by 3dcgi Strange that not all Casios are the same. I assume you meant multiplying and dividing are equal even though you wrote subtracting.
gah, i knew i made a mistake, was originally writing "multiplying and dividing are calculated from left to right, adding and substracting are counted after those again from left to right, but decided shorter is better and there's no adding/substracting other than within the parenthesis so doesn't really matter

I'll fix that
__________________
I'm nothing but a shattered soul...
Been ravaged by the chaotic beauty...
Ruined by the unreal temptations...
I was betrayed by my own beliefs...

 10-Apr-2011, 23:54 #4 Bludd Eric the Half-a-bee   Join Date: Oct 2003 Location: The cat detector van from the Ministry of Housinge Posts: 2,050 I have a TI-83 and it gives 288 as a result. I also have an HP 30S and it gives 2. http://www.google.com/search?q=48%2F2%289%2B3%29 Last edited by Bludd; 11-Apr-2011 at 00:00.
 11-Apr-2011, 00:17 #5 Davros Darlek ******   Join Date: Jun 2004 Posts: 9,486 remember the calculator in windows had errors and they offered an update Steps to Reproduce Problem Using Previous Versions of Calculator To perform this test, choose two numbers that include values to the right of the decimal point (for example, 12.52 and 12.51). Double-click the Calculator icon in the Accessories group. Enter the larger number first (for example, 12.52). Press the MINUS SIGN (-). Enter the smaller number (for example, 12.51). Press the EQUAL SIGN (=). Note that in this example you do not receive .01, the expected result. Instead, you receive one of the following: 0.00 0.0099999999 0.010000001 The updated Calculator accessory displays the correct result, which is .01. __________________ Guardian of the Most holy Two Terabytes of Gaming Goodness™
 11-Apr-2011, 00:20 #6 Bludd Eric the Half-a-bee   Join Date: Oct 2003 Location: The cat detector van from the Ministry of Housinge Posts: 2,050 Anyone have PowerCalc from Windows XP Powertoys? The calculator in Win 7 doesn't really handle inputting this equation.
 11-Apr-2011, 01:22 #7 CNCAddict Member   Join Date: Aug 2005 Posts: 278 TI-30XS calculates 288. P.S. The TI-30XS is one of the best cheap calculators I've found. For all my uses works the same as a TI-89 with the up arrow going through the history of calculations. http://education.ti.com/educationpor...ti30xs_mv.html
 11-Apr-2011, 04:24 #8 3dcgi Senior Member   Join Date: Feb 2002 Posts: 2,019 I wish someone made a good programmer's calculator with dedicated ABCDEF keys. RealCalc for Android isn't bad, but I'd like a dedicated calculator with a multi-line screen. My TI-85 has the features I need they're just buried in menus. My TI-85 has been quite the workhorse. I got it in 1993.
 11-Apr-2011, 12:20 #9 WhiningKhan Junior Member   Join Date: Sep 2002 Posts: 18 TI-85 calculates it correctly if you don't omit the multiply sign from the equation. Remember that you are actually using a programming language in this case - it is not completely the same as classic arithmetics. Consider this: A=12 48/2A You get 2, which is intuitive. When you are omitting the multiply sign, the interpreter handles it like a macro expansion and calculates the value of denominator first.
11-Apr-2011, 12:22   #10
Kaotik
yes, i'm drunk

Join Date: Apr 2003
Posts: 4,800

Quote:
 Originally Posted by WhiningKhan TI-85 calculates it correctly if you don't omit the multiply sign from the equation. Remember that you are actually using a programming language in this case - it is not completely the same as classic arithmetics. Consider this: A=12 48/2A You get 2, which is intuitive. When you are omitting the multiply sign, the interpreter handles it like a macro expansion and calculates the value of denominator first.
But it's not 2A, it's 2(A), which is completely different, and indicates there is multiply sign in between.
__________________
I'm nothing but a shattered soul...
Been ravaged by the chaotic beauty...
Ruined by the unreal temptations...
I was betrayed by my own beliefs...

 11-Apr-2011, 15:16 #11 Bludd Eric the Half-a-bee   Join Date: Oct 2003 Location: The cat detector van from the Ministry of Housinge Posts: 2,050 HP 30S also does it correctly if you multiply explicitly 48/2*(9+3)
11-Apr-2011, 16:02   #12
WhiningKhan
Junior Member

Join Date: Sep 2002
Posts: 18

Quote:
 Originally Posted by Kaotik But it's not 2A, it's 2(A), which is completely different, and indicates there is multiply sign in between.
It's doing numeric evaluation, not classical algebra. I believe the parentheses trigger partial evaluation, and by leaving out multiply sign you are indicating tight coupling for evaluation order.

 11-Apr-2011, 16:06 #13 NRP Senior Member   Join Date: Aug 2004 Posts: 1,855 Moral of the story: Don't get lazy - enter your operator signs
 11-Apr-2011, 16:52 #14 Mize That's my stapler   Join Date: Feb 2002 Location: "Midwest," USA Posts: 3,948 HP RPN FTW. Too bad they don't make the 15C anymore. Best damn calculator ever. I've had mine since 1980 and it's still the best. edit: 15c not 16c __________________ "Yes windows 3.1 was better than the macOS of the day. All the Windows OS's have been better." - eastmen Last edited by Mize; 11-Apr-2011 at 19:26.
11-Apr-2011, 18:03   #15
Grall
Invisible Member

Join Date: Apr 2002
Location: La-la land
Posts: 4,977

Quote:
 Originally Posted by 3dcgi My TI-85 has been quite the workhorse. I got it in 1993.
Me best mate bought a Casio calculator with a solar cell and rechargeable battery built-in for use in highschool. This was roughly 1990...and he still uses it.

The rechargeable battery's worn out (NiCD prolly, well before NiMH), but the solar cell still works just fine.
__________________
"If I were a science teacher and a student said the Universe is 6000 years old, I would mark that answer as wrong (why? Because it is)."
-Phil Plait

 11-Apr-2011, 19:20 #16 Mize That's my stapler   Join Date: Feb 2002 Location: "Midwest," USA Posts: 3,948 '93? '90? Bah. Lightweights! 1980 bitches! __________________ "Yes windows 3.1 was better than the macOS of the day. All the Windows OS's have been better." - eastmen Last edited by Mize; 11-Apr-2011 at 19:25.
11-Apr-2011, 19:25   #17
Davros
Darlek ******

Join Date: Jun 2004
Posts: 9,486

Quote:
 Originally Posted by Bludd Anyone have PowerCalc from Windows XP Powertoys? The calculator in Win 7 doesn't really handle inputting this equation.
is this it ?

The most i ever did with a calculator is type 5318008 and turn the calculator upside down
__________________
Guardian of the Most holy Two Terabytes of Gaming Goodness™

11-Apr-2011, 21:28   #18
Bludd
Eric the Half-a-bee

Join Date: Oct 2003
Location: The cat detector van from the Ministry of Housinge
Posts: 2,050

Quote:
 Originally Posted by Davros is this it ? http://windows.microsoft.com/en-US/w...ads/windows-xp The most i ever did with a calculator is type 5318008 and turn the calculator upside down
Power Calculator

Anyone with XP could try this and see how it does with the equation?

11-Apr-2011, 21:59   #19
Albuquerque

Join Date: Jun 2004
Location: Guess ;)
Posts: 3,084

Power calculator doesn't like the equation as-typed:

I went through several iterations, but it needs the multiply character directly stated, it will not imply it. I'm on board with the "2 as the right answer" theory, only because (as someone else mentioned) the 2(9 + 3) gives an implicit expectation of precedence.

But since this behavior isn't well defined, I'm not sure if it's actually the correct answer.
__________________
"...twisting my words"
Quote:
 Originally Posted by _xxx_ 1/25 Get some supplies <...> Within the next couple of months, you'll need it.
Quote:
 Originally Posted by _xxx_ 6/9 And riots are about to begin too.
Quote:
 Originally Posted by _xxx_8/5 food shortages and huge price jumps I predicted recently are becoming very real now.
Quote:
 Originally Posted by _xxx_ If it turns out I was wrong, I'll admit being stupid

 12-Apr-2011, 08:10 #20 nintenho Senior Member   Join Date: Feb 2006 Location: Cupertino, California Posts: 2,003 I think most people who have taken calculus would get 2 as their answer. In math and science textbooks they often stretch out long arithmetic expressions for example: n=PV/RT (T is often written as a sum) 99% of the time the ideal gas law is written that way which could be incorrect if entered into a calculator with T being a sum of two numbers. So for the equation in the OP, 2 is the wrong answer but a lot of people are just used to that form by now.
 12-Apr-2011, 10:45 #21 Davros Darlek ******   Join Date: Jun 2004 Posts: 9,486 Nope the calculator is correct remember your bodmas do the sum in brackets first 9+3 = 12 divide and multiply have equal precedence so you evaluate left to right 48/2 = 24 that leaves you with 24(12) = 288 B Brackets first O Orders (ie Powers and Square Roots, etc.) DM Division and Multiplication (left-to-right) AS Addition and Subtraction (left-to-right) Divide and Multiply rank equally (and go left to right). Add and Subtract rank equally (and go left to right) http://www.mathsisfun.com/operation-order-bodmas.html __________________ Guardian of the Most holy Two Terabytes of Gaming Goodness™
12-Apr-2011, 11:27   #22
Mize
That's my stapler

Join Date: Feb 2002
Location: "Midwest," USA
Posts: 3,948

Quote:
 Originally Posted by nintenho I think most people who have taken calculus would get 2 as their answer. In math and science textbooks they often stretch out long arithmetic expressions for example: n=PV/RT (T is often written as a sum) 99% of the time the ideal gas law is written that way which could be incorrect if entered into a calculator with T being a sum of two numbers. So for the equation in the OP, 2 is the wrong answer but a lot of people are just used to that form by now.
Blah. Nobody writes it that way and if you had to type it you'd right PV=nRT since that's the standard form.
The only time you'd write it on a single line is when coding an if you coded it:

n = P*V/R*T all would be well

in the example in this thread, if you coded

n = 48/2*(9+3) again all would be well

So if you really wanted

n = 48/(2*(9+3)) then that's what you should have written.
__________________
"Yes windows 3.1 was better than the macOS of the day. All the Windows OS's have been better."
- eastmen

 12-Apr-2011, 13:04 #23 Davros Darlek ******   Join Date: Jun 2004 Posts: 9,486 just to be clear mize how are you evaluating 48/(2*(9+3)) same way as me ? im confused because n = 48/2*(9+3) n = 48/(2*(9+3)) are not the same __________________ Guardian of the Most holy Two Terabytes of Gaming Goodness™
12-Apr-2011, 13:21   #24
Bludd
Eric the Half-a-bee

Join Date: Oct 2003
Location: The cat detector van from the Ministry of Housinge
Posts: 2,050

Quote:
 Originally Posted by Davros just to be clear mize how are you evaluating 48/(2*(9+3)) same way as me ? im confused because n = 48/2*(9+3) n = 48/(2*(9+3)) are not the same
And Mize said that they are not the same. Oh, poor Davros forgot how to read again.

 12-Apr-2011, 13:27 #25 Mize That's my stapler   Join Date: Feb 2002 Location: "Midwest," USA Posts: 3,948 LOL. Davros, all I'm saying is that the only time you would write an equation like that on a line is for coding and to get the one results (2*(9+3)) requires parens in any coding application. i.e. I was agreeing with you. __________________ "Yes windows 3.1 was better than the macOS of the day. All the Windows OS's have been better." - eastmen

 Tags fail, math

 Thread Tools Display Modes Linear Mode

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is On HTML code is Off Forum Rules
 Forum Jump User Control Panel Private Messages Subscriptions Who's Online Search Forums Forums Home News Forums     Beyond3D News         Press Releases         Beyond3D Articles Core Forums     3D Architectures & Chips         3D Beginner's Questions     3D Technology & Algorithms         3D Programming & Tools     3D Hardware, Software & Output Devices         Video Technology, Displays, & HTPC     3D & Semiconductor Industry     GPGPU Technology & Programming Embedded 3D Forums     Console Forum         Console Technology         Console Games             PC Games     Handheld Gaming     Handheld Technology     CellPerformance@B3D PC Forums     Hardware & Software Talk         Politics & Ethics of Technology         Unix, Mac, & BSD (3D)     Processor & Chipset Technology     Purchase Decisions Help     PC Games         Console Games Site Forums     General Discussion     Folding For Beyond3D Team #32377     Industry Jobs     Site Feedback Beyond3D Hall of Fame     Pre-release GPU Speculation     General 3D Technology     Consoles     Other

All times are GMT +1. The time now is 15:56.

 -- vB3D -- vBulletin Default Style Contact Us - Beyond3D - Archive - Top