Skip to main content
Version: 1.5.0

Negating

The arithmetic negation of a number is the same as subtracting that number from zero, so the negation of a natural numbers yields an integer:

const a : int = -5; // - int yields int
const b : int = -5n; // - nat yields int
// const error : nat = -5n;