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
Luke
The Ninja Space Mod
Posts: 6424 Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA
Post
by Luke » Tue Aug 01, 2006 11:27 pm
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?
Luke
The Ninja Space Mod
Posts: 6424 Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA
Post
by Luke » Tue Aug 01, 2006 11:30 pm
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 » Wed Aug 02, 2006 12:28 am
The sequence you wrote down is invalid syntax
could be a shortened version (Or you missed the multiplication sign (.))
Luke
The Ninja Space Mod
Posts: 6424 Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA
Post
by Luke » Wed Aug 02, 2006 12:51 am
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 » Wed Aug 02, 2006 2:42 am
I'd treat it as multiplication, and give the answer 72
Luke
The Ninja Space Mod
Posts: 6424 Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA
Post
by Luke » Wed Aug 02, 2006 2:43 am
GM wrote: I'd treat it as multiplication, and give the answer 72
and you would be right
hydroxide
Forum Commoner
Posts: 77 Joined: Mon Jun 05, 2006 9:53 am
Post
by hydroxide » Wed Aug 02, 2006 7:13 am
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.
RobertGonzalez
Site Administrator
Posts: 14293 Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA
Post
by RobertGonzalez » Wed Aug 02, 2006 9:19 am
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'.
Ambush Commander
DevNet Master
Posts: 3698 Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US
Post
by Ambush Commander » Wed Aug 02, 2006 4:57 pm
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 » Thu Aug 03, 2006 12:35 am
Just wait till you get to multiple variables equations...
tcsoft
Forum Newbie
Posts: 12 Joined: Mon Jul 24, 2006 10:46 am
Location: Austria
Contact:
Post
by tcsoft » Fri Aug 04, 2006 10:28 am
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)
infolock
DevNet Resident
Posts: 1708 Joined: Wed Sep 25, 2002 7:47 pm
Post
by infolock » Fri Aug 04, 2006 10:39 am
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;
?>