Top "Negation" questions

Negation is the logic operation that inverses a value, also seen as a NOT operation.

Django query negation

I know how to build filters and Q objects in django, but I don't know how to negate the operators …

django negation
Multiplication function with recursion in Python

I need to write the function mult( n, m ) that should output the product of the two integers n and …

python function recursion multiplication negation
Implementing logical negation with only bitwise operators (except !)

~ & ^ | + << >> are the only operations I can use Before I continue, this is a homework question, …

c bit-manipulation boolean-logic negation
What does !! (double exclamation point) mean?

In the code below, from a blog post by Alias, I noticed the use of the double exclamation point !!. I …

perl operators boolean negation
Why use abs() or fabs() instead of conditional negation?

In C/C++, why should one use abs() or fabs() to find the absolute value of a variable without using …

c++ c variables negation absolute-value
Does any language have a unary boolean toggle operator?

So this is more of a theoretical question. C++ and languages (in)directly based on it (Java, C#, PHP) have …

language-agnostic bitwise-operators negation
Does if (!(-1)) evaluate to true or false in C?

I know that 0 and NULL evaluate to FALSE on their own and I know that a negative integer or a …

c if-statement negative-number negation