implemenet _negative and _invert

Signed-off-by: Mattias Andrée <maandree@operamail.com>