on 5/14/03 6:41 AM, Shari at [EMAIL PROTECTED] wrote: >> There are several little niggly things in programming that violate, say, the >> algebraic order of operations. > > Oh you've peaked my curiousity! Give an example :-) > > Shari C
OK, here's the most glaring one. In algebra, the order of operations is Parentheses, Exponents, Multiplication and Division from left to right, Addition and Subtraction from left to right. Negative numbers are considered to be the product of the positive number and -1. (Hold this thought). Algebraically, -2^4 means -1*2^4. The exponent only affects what it is attached to. -2^4 = -16. With computers, however, -2^4 = 16. The computer does the negation before the exponent, even though negation algebraically is multiplication. It makes sense, since the representation of negative integers in binary reveals no "negative" sign. It is just another number. Raymond _______________________________________________ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
