On 8/29/07, Dirkjan Ochtman <dirkjan at ochtman.nl> wrote: > Alexandre Vassalotti wrote: > > C doesn't have an exponentiation operator. You use the pow() function, instead: > > Wouldn't it make more sense, then, to have unary +/- have higher > precedence than the ** operator, so that -3**2 == 9? No, that would have been really bad. Anyone who's had high school algebra expects -x**2 to be -(x**2) and not (-x)**2. I think the weirdness comes from parsing -a/b as (-a)/b rather than -(a/b). It should be the latter, if compatibility with math notation is more important than compatibility with C. Oh well. Maybe in Python 4. :) -j
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4