On Saturday, 2 November 2013 at 22:45:13 UTC, Ali Çehreli wrote:
I spent considerable amount of time on those names. Like you, I am not happy with Inverse. :)

I wanted to say struct Negate and function negate(). But ! is the negation operator.

I like opposite better but the Wikipedia article calls it "additive inverse" so inverse is still acceptable, I guess? :)

  http://en.wikipedia.org/wiki/Operators_in_C_and_C++

Well, if you don't want to change it now that the chapter has been released, don't worry -- it's not wrong per se, just somewhat unintuitive to my native English ear.

I think that Negative and negative() (not Negation) would be fine. Bear in mind that ! is the _logical_ negation operator; without the qualifier, the word doesn't have the same meaning. "The negative of x" is just -x.

The trouble with inverse (for me) is that its colloquial meaning is the multiplicative inverse, while in a strict mathematical sense it is too general -- you can have an inverse of _any_ function, so the term always needs to be qualified as the "inverse of ..." (whether of addition, multiplication, some other choice of function). But this may be my fussing too much. ;-)

Reply via email to