Base conversion library (base 2 to 16) with decimal and fractional support.
Project description
base_converter
A simple and reliable Python library for converting numbers between different bases (from base 2 to base 16), including support for fractions.
##Features
- Convert from any base (2 to 16) to decimal
- Convert from decimal to any base (2 to 16)
- Supports fractional numbers and negative values
Installation
pip install base-converter-pedromagno
Usage
from converter_base import convert_from_base_n_to_decimal, convert_from_decimal_to_base_n
print(convert_from_base_n_to_decimal("1A.4", 16)) # Output: 26.25
print(convert_from_decimal_to_base_n(26.25, 16)) # Output: '1A.4'
This project itself does not require any third-party libraries to use the core functionality.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file base_converter_pedromagno-0.1.1.tar.gz.
File metadata
- Download URL: base_converter_pedromagno-0.1.1.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c7e088f45f14b92151c8962d8d2e1255c4a956e0ab3a92b1dabbceb703722e8a
|
|
| MD5 |
2b3d5c95fb4e51aba5033a208825d774
|
|
| BLAKE2b-256 |
744e48294a059cf856efb4e10acca9bab109da48353070905d7f61a818343ef1
|
File details
Details for the file base_converter_pedromagno-0.1.1-py3-none-any.whl.
File metadata
- Download URL: base_converter_pedromagno-0.1.1-py3-none-any.whl
- Upload date:
- Size: 3.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d882a2f0c67cef0b33d4cc1a23c21e5747b73f8b36a234eb1cfa7fef18645692
|
|
| MD5 |
9e598634316db673ea3f6bb70ea3ed97
|
|
| BLAKE2b-256 |
e2af7382dade46f2b6944bf25e7d74d534a7d68480aca911e94f2c76d682f2b1
|