Can't figure out basic math

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Can't figure out basic math

Post by Luke »

This is kind of embarrassing. I haven't been in school for over 2 years, so I am taking some practice tests on my college's site. They have problems like this:
- 4(- 9)(2)
What is that even asking? What do the parenthesis do? I don't remember this from school. It just says to solve that. so do I add all those together?? what the hell?
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

nevermind... it's multiplication I'm pretty sure. Somebody slap the stupid out of me please!

I guess this means I'm going to have to start all over with algebra... that sucks and it's sad. ( I can't believe I forgot all this crap already!!!)
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

The sequence you wrote down is invalid syntax :P could be a shortened version (Or you missed the multiplication sign (.))
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

number between the parenthesis is meant to be operated on kind of like a variable 4x == 4(-10)
GM
Forum Contributor
Posts: 365
Joined: Wed Apr 26, 2006 4:19 am
Location: Italy

Post by GM »

I'd treat it as multiplication, and give the answer 72
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

GM wrote:I'd treat it as multiplication, and give the answer 72
and you would be right :wink:
User avatar
hydroxide
Forum Commoner
Posts: 77
Joined: Mon Jun 05, 2006 9:53 am

Post by hydroxide »

With algebra 4(3) == 12. Also 4(3) == 3(4). (4)(3) == 12. (2)(3)(4) == 24.

in case you don't remember, the / sign means division. So, (4)(3)/2 == 6.
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Re: Can't figure out basic math

Post by RobertGonzalez »

The Ninja Space Goat wrote:This is kind of embarrassing. I haven't been in school for over 2 years, so I am taking some practice tests on my college's site. They have problems like this:
- 4(- 9)(2)
What is that even asking? What do the parenthesis do? I don't remember this from school. It just says to solve that. so do I add all those together?? what the hell?
This is the same as -1 * (4 * (-9) * 2) => -1 * (-36 * 2) => -1 * (-72) => 72.

PS In mathematics, the => means 'yields'.
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Post by Ambush Commander »

Just wait till you get to the Sigma notation...
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

Just wait till you get to multiple variables equations...
User avatar
tcsoft
Forum Newbie
Posts: 12
Joined: Mon Jul 24, 2006 10:46 am
Location: Austria
Contact:

Post by tcsoft »

I think you should read this like that (since there are spaces between the - operator and you need to parantese negative numbers):
1 - 4 x (1 - 9) x (2)
:?:
User avatar
infolock
DevNet Resident
Posts: 1708
Joined: Wed Sep 25, 2002 7:47 pm

Post by infolock »

tcsoft wrote:I think you should read this like that (since there are spaces between the - operator and you need to parantese negative numbers):
1 - 4 x (1 - 9) x (2)
:?:
no... actually that should be ( (1 - 5 ( 1 - 10)) x 2

;)

better yet :

Code: Select all

<?php

$a = 1;
$b = 5;
$c = 10;
$d = 2;

$rst = ( ( ($a - $b) * ($a - $c) ) * $d );
echo $rst;
?>
or even

Code: Select all

<?php
$a = 1;
$rst = ( ( ( $a - ($a + 4) ) * ($a - ($a - 10) ) * ($a + 1) );
echo $rst;
?>
:-D
Post Reply