Skip to content

Latest commit

 

History

History
39 lines (24 loc) · 1.1 KB

signed.mkd

File metadata and controls

39 lines (24 loc) · 1.1 KB

Signed Arithmetic

Checked Arithmetic

For signed integers you can apply the rules of ordinary mathematical integers. This works even with limited range because the compiler can assume that overflow does not happen.

The use of signed integers results in faster code:

or safer code

or faster and safer code:

References: