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 hashes)
Built Distribution
Close
Hashes for roundmantissa-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 646b48a0f9ba29211ed485a794dad8430dad9449a0eaddfd52ebf9d9cb3c18ca |
|
MD5 | 099d9aa7229499ea31e79b7f67cb33af |
|
BLAKE2b-256 | 865c8a79ad38d8521ce0f6955ae2c4db6efcaefd63c15bc8e217a3fc74b34f27 |