Python package that allows to get mathematically rounded floating numbers.
Project description
math_round_af
math_round_af
is a Python package that allows to get mathematically rounded floating numbers.
Prerequisites
Before you begin, ensure you have installed the latest version of Python.
Installing math_round_af
To install math_round_af
, follow these steps:
Linux and macOS:
pip3 install math-round-af
Windows:
pip install math-round-af
Using math_round_af
There are examples of how to use math_round_af
:
>>> from math_round_af import get_rounded_number
>>> get_rounded_number(0.4)
0.0
>>> get_rounded_number(0.5)
1.0
>>> get_rounded_number(-0.4)
0.0
>>> get_rounded_number(-0.5)
-1.0
>>> get_rounded_number(3.142, 0)
3.0
>>> get_rounded_number(3.142, 1)
3.1
>>> get_rounded_number(3.142, 2)
3.14
Contributing to math_round_af
To contribute to math_round_af
, follow these steps:
- Fork this repository.
- Create a branch:
git checkout -b <branch_name>
. - Make your changes and commit them:
git commit -m '<commit_message>'
- Push to the original branch:
git push origin <project_name>/<location>
- Create the pull request.
Alternatively see the GitHub documentation on creating a pull request.
Contributors
Contact
If you want to contact me you can reach me at albertfarhutdinov@gmail.com
.
License
This project uses the following license: MIT License.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file math_round_af-1.0.3.tar.gz
.
File metadata
- Download URL: math_round_af-1.0.3.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c716f425ea36a7d8cae9171deda650b90ccfc5b0780b8e4e3a0c554b2c217c9 |
|
MD5 | 3f56a17d8b7eb73974c49eb40c5be7cb |
|
BLAKE2b-256 | a12c3228cb1a5bf344548ec09dd40b8a84c1a40cb3a9e05eb80a005828a9b338 |
File details
Details for the file math_round_af-1.0.3-py3-none-any.whl
.
File metadata
- Download URL: math_round_af-1.0.3-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11ea991f3cc8c5ed245d1bd87452dd8e1520e9349df582809216be5b6aac1486 |
|
MD5 | 05b8fe762c1986074381247e8b40c099 |
|
BLAKE2b-256 | 25ef421babb0a3446371dc17fc7c0434e6e0e211c25ce8b1d496402304a122ad |