Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add various arithmetic operations (#39)
* Implement Mul, MulAssign, Div, DivAssign Small step towards #32 * Implement wrapping_xxx; fix Shl/Shr semantics in debug builds - Implement `wrapping_add`, `wrapping_sub`, `wrapping_mul`, `wrapping_div`, `wrapping_shl`, `wrapping_shr` - In debug builds, `<<` (`Shl`, `ShlAssign`) and `>>` (`Shr`, `ShrAssign`) now bounds-check the shift amount using the same semantics as built-in shifts. For example, shifting a u5 by 5 or more bits will now panic as expected. * Add saturating_xxx * Addressed comments * Fix build in debug mode * Add checked_xxx and overflowing_xxx * List all new methods
- Loading branch information