Thanks for the sane and sober response. BTW, ANSI C was awesome. It
even weaned me off of Fortran in its time.
For the record, I entered exactly this: 16/2(8-3(4-2))+1 into
a) Google
b) Mathematica
c) a TI 83-plus calculator
In every case, the answer is 17.
-- Rick
--- "Michael S." <M.Suesserott@gmx.net> wrote:
> Hi Rick,
>
> so glad to see you are keeping the banner of clear thinking flying.
> As a
> former professor of computer science and also a past member of the
> ANSI
> committee that standardized C (the computer language), I very much
> believe in the educational value of testing one's theories on a
> computer. Helps to keep a person intellectually honest.
>
> So I appreciate your suggestion to these posters to try their
> examples
> in Mathematica. For those who do not have access to this very
> sophisticated program, most of the current computer languages will
> suffice to make the underlying principles of precedence and
> associativity clear. C, C++, Java, Python, etc. all use the same
> standard evaluation order for arithmetic expressions. There is one
> caveat, though: none of these languages use square brackets for
> grouping, and none allow simple juxtaposition as a shortcut for
> multiplication.
>
> So,
> 16 / 2 [8 – 3 (4 – 2)] + 1
> would have to be rewritten as
> 16 / 2 * (8 – 3 * (4 – 2)) + 1
>
> Here are two websites that may help:
>
>
http://www.algebra.com/algebra/college/abstract/Associativity.wikipedia
> http://msdn2.microsoft.com/en-us/library/ms139741.aspx
>
> Please note that in mathematics terminology, a left-associative
> operation is a non-associative operation that is conventionally
> evaluated from left to right. This refers to one operator only, as in
> 16/2/2.
>
> In computer science, left-to-right associativity is also defined for
> an admixture of two or more operators of the same precedence level,
> as in 16/2*2.
>
> Best regards,
>
> Michael
>
>
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/Math4u/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/Math4u/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:Math4u-digest@yahoogroups.com
mailto:Math4u-fullfeatured@yahoogroups.com
<*> To unsubscribe from this group, send an email to:
Math4u-unsubscribe@yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:

No comments:
Post a Comment