Skip to content

NOT Expression

NOT uses ACE's numeric NOT transformation. For the boolean values 0 and 1, it behaves as logical NOT. For other numeric inputs, the production implementation has additional defined behavior and must not be described as ordinary boolean negation.

Syntax

NOT{value}

Exact behavior

The current production implementation applies these rules in order:

Input Result
0 1
1 0
any value greater than 1 the negated value (-value)
any other numeric value the absolute value (abs(value))

Examples matching ACE's math-parser tests:

NOT{0}      -> 1
NOT{1}      -> 0
NOT{5}      -> -5
NOT{-3}     -> 3
NOT{-0.5}   -> 0.5

For boolean logic, use 0 and 1 values produced by expressions such as COMPARE, CONTAINS, AND, and OR.

Inside CALC, unary ! invokes the same numeric NOT transformation.