Expand description
Base conversion module for arbitrary-precision numbers.
This module provides functionality to convert numbers between different bases, supporting bases from 2 to 62. It handles both integer and fractional numbers, and uses a custom BigUint implementation for arbitrary-precision arithmetic.
§Features
- Convert numbers between any base from 2 to 62
- Support for fractional numbers
- Arbitrary-precision arithmetic using BigUint
§Examples
use dev_utils::base_change::convert_base;
assert_eq!(convert_base("1010", 2, 10).unwrap(), "10");
assert_eq!(convert_base("FF", 16, 10).unwrap(), "255");Structs§
- BigUint
- A custom arbitrary-precision unsigned integer implementation.
- Fixed
Decimal - A fixed-point decimal number representation.
Enums§
- Base
Conversion Error - Represents errors that can occur during base conversion.
Functions§
- convert_
base - Converts a number from one base to another.
- digit_
to_ val - Converts a digit character to its numeric value.
- val_
to_ digit - Converts a numeric value to its digit character representation.