Round mantissa of a float number
Project description
pip install -U roundmantissa
roundmantissa
Tiny library :baby_chick: that rounds floating point numbers based on the length of their mantissa.
5.0 = 4.0 + 1.0 = (1 + 1/4) * 2**2 = b1.01 * 2**2
round_mantissa(5.0, 0) = b1. * 2**2
round_mantissa(5.0, 1) = b1.0 * 2**2
round_mantissa(5.0, 2) = b1.01 * 2**2
:hatched_chick: :hatched_chick: :hatched_chick:
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
roundmantissa-0.2.1.tar.gz
(3.4 kB
view details)
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 roundmantissa-0.2.1.tar.gz.
File metadata
- Download URL: roundmantissa-0.2.1.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
92b6bda5ab5f0dac437a0b270f228adfb39971668eff9dd9cb06460cf37af935
|
|
| MD5 |
1ce94a9c7dc01741f469984f90983ac0
|
|
| BLAKE2b-256 |
23b9033a3e1d79cef5400cce2a7dab2f1aec2563dee71a1d0ac2dca578109a17
|
File details
Details for the file roundmantissa-0.2.1-py3-none-any.whl.
File metadata
- Download URL: roundmantissa-0.2.1-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
646b48a0f9ba29211ed485a794dad8430dad9449a0eaddfd52ebf9d9cb3c18ca
|
|
| MD5 |
099d9aa7229499ea31e79b7f67cb33af
|
|
| BLAKE2b-256 |
865c8a79ad38d8521ce0f6955ae2c4db6efcaefd63c15bc8e217a3fc74b34f27
|