Thread: Math question
View Single Post
Old 09-24-2007, 10:21 AM  
just a punk
So fuckin' bored
 
just a punk's Avatar
 
Industry Role:
Join Date: Jun 2003
Posts: 32,391
Quote:
Originally Posted by alex_1980 View Post
I will concede that we are both correct and that the problem lies in the syntax of the formula.

I was reading -25/27x as meaning a fraction where 27x was the denominator.
ie: ((-1)(25))/((27)(x))

You read it as just an order of operations: (-1)(25)/(27)(x)

We are therefore both correct based on our own assumptions about the problem.
Nope, the syntax of formula was absolutely exact. There are no 2 interpretations of -25/27x in math. It's ALWAYS equal to this:
-25
---- x
27

Otherwise it would be written as follows: -25/(27x). It's a main rule of brackets calculation. BTW, that's how ALL the programming languages do process such a formula. -25/27x is always -25 / 27 * x but never -25 / (27 * x)!

E.g.:

/* PHP */
$x = 50;
echo -25 / 27 * $x;

or

/* ANSI/ISO C */
x = 50;
printf("%d\n", -25 / 27 * x);

or

(* ANSI Pascal *)
x := 50;
writeln(-25 / 27 * x);

and so on...
__________________
Obey the Cowgod
just a punk is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote