This is the simplest module for quick work with float - bin,oct,hex.
Project description
sys_calc
Number Conversion and IEEE 754 Representation
This project includes functions for:
- Converting floating-point binary numbers to decimal.
- Converting floating-point octal numbers to decimal.
- Converting floating-point hexadecimal numbers to binary.
- Converting floating-point numbers to hexadecimal representation in IEEE 754 format (single precision).
Usage
To use the conversion functions, simply call the respective function with the number string in the desired number system.
To convert floating-point numbers to hexadecimal representation, use float_to_hex_single(f, d)
, where f
is the floating-point number, and d
is the bias (default is 127).
Examples
binary_float_to_decimal('1101.101')
octal_float_to_decimal('17.45')
hex_to_binary('A.B')
float_to_hex_single(3.14)
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
sys_calc-0.0.1.tar.gz
(3.0 kB
view details)
Built Distribution
File details
Details for the file sys_calc-0.0.1.tar.gz
.
File metadata
- Download URL: sys_calc-0.0.1.tar.gz
- Upload date:
- Size: 3.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5dedd2981df975a39d8c0c9e9c76dbb21cb4d795e88116923c1125b0b66224af |
|
MD5 | e1db0120f8231debf31fbf0dd9af4971 |
|
BLAKE2b-256 | eaf7bfd8536489aec78c3648a9c64335be000c5a48d1496d5163b7f3cdf2bf80 |
File details
Details for the file sys_calc-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: sys_calc-0.0.1-py3-none-any.whl
- Upload date:
- Size: 3.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.11.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b8d8be72a00c17fb3c5e1b1d0d38839ca96dc365541887a90059da8b2495007c |
|
MD5 | b342a36d7568e98525b98f9182fceb8e |
|
BLAKE2b-256 | dc3386e4fa3cd25ae0fdef0721f1e6acd62a1d7475e6fa9905c75b4133ef8003 |