In programming you can negate a double. At least Google hits tend to that, but there are, though, a lot of hits for invert a double.
While the definition of to invert is clear
to change the normal position of something, especially by turning it upside down or by arranging it in the opposite order
the definition of to negate seems to have a bit different meaning
1 to stop something from having any effect
2 to state that something does not exist
Other dictionaries like merriam-wesbster back that up:
to deny the existence or truth of
to cause to be ineffective or invalid
Having said that I wonder why there are so many Google hits for to negate a double. We neither make it invalid nor we cease its existence.
I found one definition that goes into the direction of turning a value to its opposite but the definition fits more to a boolean than a double because NOT 5 is unequal to MINUS 5.
Computer Science: To perform the machine logic operation NOT gate. thefreedictionary
But the noun negation fits at all:
the exact opposite of something; the act of causing something not to exist or to become its opposite
So, why do we negate a double instead of invert a double?