The Godfather talking
You think I am funny guy huh?
Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 10, 2023, 01:31:01 01:31


Login with username, password and session length


Pages: [1]
Print
Author Topic: How would you evaluate this expression  (Read 1242 times)
0 Members and 1 Guest are viewing this topic.
Sideshow Bob
Cracking Team
Hero Member
****
Offline Offline

Posts: 960

Thank You
-Given: 229
-Receive: 958



« on: September 26, 2023, 01:31:58 13:31 »

Ok so if a person wrote this down on a piece of paper this expression
-22
How would you evaluate it
would it be as -(22)=-4
or (-2)2=4
I am in =4 camp. because I read it as minus two squared. If I was to type this into my HP50g or the windows calculator I would key in 2+(+/-)+X2. But if you try the google calculator you will get -4. It will also depend highly on what brand of scientific calculator you have. If you write it out on paper. It looks like people in North America will say -4 because at least up to high-school they learn to follow a very strict PEMDAS regime https://www.mathsisfun.com/operation-order-pemdas.html
But in other countries it is learned the unary minus operator negates the value of the operand so it is  (-2)2=4. What do you think? But please bury any flamethrowers in the discussion. It will depend on many factors
Logged

I have come here to chew bubblegum and kick ass... and I'm all out of bubblegum
Parad1gm
Newbie
*
Offline Offline

Posts: 18

Thank You
-Given: 19
-Receive: 5


« Reply #1 on: September 26, 2023, 02:28:19 14:28 »

I was raised using the BEDMAS system and seeing as the "-" is in front of the 2 without a bracket that is -2.  Even -(22) is wrong because it should read -1 x (22) (Can't really have a - in front of a bracket without some number)

Logged
Catcatcat
Senior Member
****
Offline Offline

Posts: 402

Thank You
-Given: 269
-Receive: 1471



WWW
« Reply #2 on: September 27, 2023, 07:02:32 07:02 »

This should be understood as the number minus two squared. Those, the number minus two must be multiplied by the number minus two and this is equal to four.
-22 = 4
Logged
Sideshow Bob
Cracking Team
Hero Member
****
Offline Offline

Posts: 960

Thank You
-Given: 229
-Receive: 958



« Reply #3 on: September 27, 2023, 09:02:13 09:02 »

Even -(22) is wrong because it should read -1 x (22) (Can't really have a - in front of a bracket without some number)
I am not sure I follow what you are saying here. So you are saying -(-3-4) has to written as -1*(-3-4). That was new to me, although purely mathematical both expressions are correct and equal. And also google calculator accept both and give 7 as answer 
Logged

I have come here to chew bubblegum and kick ass... and I'm all out of bubblegum
Parad1gm
Newbie
*
Offline Offline

Posts: 18

Thank You
-Given: 19
-Receive: 5


« Reply #4 on: September 27, 2023, 05:35:15 17:35 »

We have adapted -( as a short hand for -1 * (.  When learning order of operation the teach explicitly explained that was the case.
Logged
2Code
Junior Member
**
Offline Offline

Posts: 56

Thank You
-Given: 10
-Receive: 237


« Reply #5 on: September 28, 2023, 08:42:30 20:42 »

From 100 years ago I remember something like below, 1 is put there just to be more logic when you multiply with the sign, most of the time is not used. Maybe some education system have different methods for it
-22=(-1)*(2)2 =(-1)*2*2=-4
(-2)2=(+1)*(-2)2=1*(-2)*(-2)=4
Logged
Magnox
Active Member
***
Offline Offline

Posts: 247

Thank You
-Given: 968
-Receive: 276


Oink!


« Reply #6 on: September 30, 2023, 12:09:05 00:09 »

From my learning I agree with 2Code (-22 = -4), although I've certainly come across the opposite perspective where a negative sign alone preceding a number is taken to be part of the number, not an operator. That's what causes the confusion/difference. It should always be treated as an operator (written as just - instead of -1* for short).

Qalculate gives the correct answer of -4; it even helpfully expands it as: -2^2 = -(2^2) = -4.
Excel gives an incorrect answer of 4 for -2^2. MS is aware of this... their answer is basically that Excel is for accountants, not mathematicians  Roll Eyes

Parentheses are our friends  Grin
« Last Edit: September 30, 2023, 12:21:23 00:21 by Magnox » Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC