Quote Originally Posted by brewbuck View Post
And saying that x * x is somehow an obfuscation of exponentiation just means you need some remedial math courses.
So would you not say that 1+1+1+5 = 8 is an obfuscation of 3+5 = 8? Is x * x * x * x * x * x * x * x not an obfuscation of pow(x, 8)? Why is this any different than pow(x, 2)?

Are you suggesting that pow() is somehow closer to mathematical notation?
That's exactly what im suggesting.

First of all, it obviously isn't
What a stellar argument, you have convinced me.

you don't seem to complain that multiplication is done by some weird "star" operator that isn't used for scalar multiplication in mathematics.
That is a property of the language, how is this relevant in any way? We're talking about writing concise and self-documenting code, in short, good coding practice. But however we choose to write our code, we still have to adhere to the rules of the language we are using, when have i ever contested this?

And ninth of all, or whatever I'm up to now
I believe you're at 4 now, perhaps "you need some remedial math courses"?

using pow() requires you to write the magic number "2.0" into your code. You can leave a magic number sitting there, or you could do something really weird like #define THE_POWER_OF_THE_GRAVITY_LAW 2.0 somewhere, and then some jackass would probably think it could be changed.
This is not a property of the pow() function, this is a property of the standard mathematical notation. To express x to the power of 2, you need to include the number 2, whether you like it or not, you're trying to get around this fact by optimizing out the call to pow(). If you're trying to express x to the power of whatever, you use the pow() function, why should there be a special case for 2? Just for brevity? Is it because you feel it's safe to assume that whoever is going to read your code can automatically make the connection between pow(x, 2.0) and x * x? Can you not see that this is an obfuscation? (albeit a small and insignificant one, as i said, we are splitting hairs here)