flat assembler
Message board for the users of flat assembler.
Index
> Heap > +  X ÷ () ^ 
Author 

Enko
this might result interesting for you:
http://warnet.ws/news/43895 If both is true, then mathematic become ambiguos. And the utility is lost becouse it wouldn't be "universal" It similar to the right side driver in England or Japan. Say you are in Germany or Spain driving your car and start thinking...... hey man, in England they drive the other way... BOTH SHOULD BE TRUE. So to prove your point, you start driving the other path, as result, collision with a big big truck resulting in your death. it´s just a representation, if it surves your needs, its valid, when the math are no long util, then its time to rethink it; starting this way a new paradigm. Who knows, perhaps in the future, the precedense of the delimiters will no longer be as we know it ^^ 

06 May 2011, 19:43 

MHajduk
Math never is "ambiguous" while your formulas may be  that's why we are using parentheses (or denote expressions using RPN). Math is a some kind of dictatorship of rules which lead us from the axioms and definitions of objects to theorems, from simplicity to complexity. But math by no means is a "religion", it's a language of the mind, ordered way to express our thoughts (similar with music which is a language of the heart; both languages are hardly comparable but vitally important to us ).
The rules of evaluation of expressions may be sketched as follows:
The reason of the evaluation from left to right is that division and subtraction aren't associative and order of the arguments is important for the result. Obviously, it's an effect of the definition of these operations. Excluding some special cases, we have for most a, b and c following inequalities: (a  b)  c ≠ a  (b  c) (a / b) / c ≠ a / (b / c) More detailed information you may find in any textbook of analysis. 

07 May 2011, 17:36 

Tyler
A mnemonic you can use is "PEMDAS." Pronounced "pemdos."
Parentheses Exponents Multiplication and Division Addition and Subtraction But even with correct precedence, you still must remember to evaluate from left to right. 

07 May 2011, 20:15 

neville
Tyler wrote: A mnemonic you can use is "PEMDAS." Pronounced "pemdos." Our mnemonic was BEDMAS. Pronounced "bedmass" Brackets Exponents Division Multiplication Addition Subtraction Anyhow, the "mathematically correct" answer for sleepsleep's expression is 9. If he wanted it to be 1 it has to be 6÷(2(1+2)). No ambiguity! _________________ FAMOS  the first memory operating system 

07 May 2011, 23:33 

edfed
these kind of "ambiguity" is a typical mistake of the beginner.
who never had this problem at school when it was time to calculate the result of some advanced equation? 

07 May 2011, 23:36 

Tyler
neville wrote:
BEDMAS would be better, but we don't use brackets nor consider the word as a synonym for parentheses. Here, [] are brackets and () are parentheses. 

16 May 2011, 03:23 

revolution
neville wrote:
More correctly: Brackets Order (i.e left to right parsing) Exponents Division/Multiplication Addition/Subtraction 

07 Jun 2011, 11:34 

sinsi


07 Jun 2011, 11:42 

< Last Thread  Next Thread > 
Forum Rules:

Copyright © 19992020, Tomasz Grysztar.
Powered by rwasa.