# Changelog

Notes significant changes to `i256`.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [0.1.12] 2024-12-30

## Added

- Added the `const` comparison functions for the full `Ord` API.
- Added `to_str_radix`.
- Add support for 32-bit limbs.
- `most_significant_limb` and `least_significant_limb` methods.
- Added `widening_mul` and `carrying_mul` methods.

## Fixed

- Behavior for `overflowing_div` and similar division methods when dividing by zero to properly panic.
- Overflow checks for `shr` and `shl` implementations.
- Fixed the padding and formatting for `Octal`, `UpperHex`, `LowerHex` and `Binary`.
- Division by an unsigned factor from a signed big integer, to correctly adjust the quotient and remainder for floor division.
- Optimize unsigned, checked multiplication by looking for immediate overflow.

## Changed

- Made the internal implementation size-generic, mostly, so we can use higher order types for our precomputed division.
- Improved addition and subtraction performance.
- Implemented multiplication in big-endian order, without any byte order changes, on big-endian systems.

## Removed

- The `shr_const_*` and `shl_const_*` methods, since `wrapping_shr` should cover every use-case.
- Our entire wide API, and replaced only with limb.
- The casts `as_i256`, `as_u256`, `from_i256`, and `from_u256`, since these don't generalize to higher order types.
- The `new()`, `high()`, and `low()` methods, since these generalize poorer to larger type sizes and the `from_*e_u64` and similar methods provide a complete replacement.

## [0.1.1] 2024-12-24

## Fixed

- Crate description and repisitory link on crates.io (#37, @pthariensflame).

## [0.1.0] 2024-12-24

## Added

- Complete API matching the core, primitive integral types.
- Optimizations for most mathematical operations.
