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.0.tar.gz
(3.1 kB
view hashes)
Built Distribution
Close
Hashes for roundmantissa-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68a87d19ab7dd32552b71454d4ff6ee82e91aea7d80755709fd6afb82cef4fc9 |
|
MD5 | 879f895e56eaf921d29fb9e0959dc065 |
|
BLAKE2b-256 | 54282b6451590706266b89a5bb60c1e5d66feb0b13d94a64ac32707895b6a9e7 |