3 ms·
They don't support general arithmetic. They do have member functions for abs, multiplication, negation and power operations, but they are all checked/saturating
by Measter 2y ago
They don't support general arithmetic. They do have member functions for abs, multiplication, negation and power operations, but they are all checked/saturating if they can result in 0.
If you want to do actual arithmetic, you have to get the internal i16, perform the arithmetic, then rewrap it.
https://godbolt.org/z/T5e36zzM5 https://godbolt.org/z/T5e36zzM5