[Tutor] a puzzle about -3**2 vs (-3)**2
fiberfolly at gmail.com
Sun Aug 2 02:26:27 CEST 2015
> According to Wikipedia:
> some scientific journals now treat multiplication as a higher precedence
> than division with a / so that 1/2x equals 1/(2x), not (1/2)x.
> There's an interesting study done here:
> "Developer beliefs about binary operator precedence"
> which suggests that even professional programmers get operator
> precedence wrong at a high rate. (The study found a 33% error rate.)
> The bottom line is, there is no universal right or wrong answer for the
> precedence rules for operators, although some rules are less right than
Interesting info. Thanks for following up on this.
Deb Wyatt in WA
More information about the Tutor