Adaptive Floor
A Python library for precise number flooring with adaptive decimal precision. It ensures accurate results without floating-point errors.
🚀 Features
- Floor to Fixed Precision: Floors a number to a specific number of decimal places.
- Adaptive Precision: Dynamically determines the required decimal places based on fractional magnitude.
- Avoids Precision Loss: Uses
decimal.Decimalfor high accuracy.
📌 Installation
Clone the repository:
git clone https://github.com/tnam0x/adaptive_floor.git
or install via pip:
pip install adaptive-floor
📖 Usage
from adaptive_floor import adaptive_floor
# Floor a number to 3 decimal places
print(adaptive_floor(12.34567, 3)) # Output: 12.3456
# Adaptive flooring based on fractional part
print(adaptive_floor(0.004567)) # Output: 0.00456 (auto-determined decimals)
📜 License
This project is licensed under the GNU General Public License v3.0 (GPLv3). See the LICENSE file for details.
Metadata
Release files for adaptive-floor 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| adaptive_floor-0.1.6.tar.gz | 14.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| adaptive_floor-0.1.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 30.0 kB
Release files / adaptive_floor-0.1.6.tar.gz
| Download URL | adaptive_floor-0.1.6.tar.gz |
|---|---|
| Size | 14.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7fb9ce8b06eef4787c6a90821fd488ab408ff60c36b1ccf81cddd13fb9d6a5c8
|
|
BLAKE2b-256 checksum How to use checksums |
b06db6ab6132aec6a56de3d724254af25cbfbf3146bfa923d576a81c3175dda0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Release files / adaptive_floor-0.1.6-py3-none-any.whl
| Download URL | adaptive_floor-0.1.6-py3-none-any.whl |
|---|---|
| Size | 15.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c3cd2efc57f952f75d79bf4045cd76a30957d6f4e17447cacd077befc5c171c7
|
|
BLAKE2b-256 checksum How to use checksums |
9ce5659dd036ab2370a13f0ba22728a18d596135b6319774e51a55c32b0a64a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Security for adaptive-floor 0.1.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.