3 ms·
> Every processor made (that I'm aware of) in the last 30+ years has used 2's complement arithmetic DSPs often use saturating overflow IIRC
by jcelerier 9y ago
> Every processor made (that I'm aware of) in the last 30+ years has used 2's complement arithmetic
DSPs often use saturating overflow IIRC
- phkahler 9y ago>> DSPs often use saturating overflow IIRC I've used them, and used that feature. It was an option that could be turned on and off. The basic arithmetic was the same as any other CPU unless that was enabled.
- steveklabnik 9y agoSimilar to above comments about wrapping_add, Rust has saturating_add as well.
- Symmetry 9y agoIdeally your ISA would provide adds that wrapped, adds that saturated, and adds that threw an exception on overflow.