This is a Python package to do exact real arithmetic, the following is an example using it:
```python
from precreal import Real,intpow,pi
>>> 0.1+0.2==0.3 # Precision loss
False
>>> Real("0.1")+Real("0.2")==Real("0.3") # The Real class has NO precision loss when doing arithmetic
True
>>> intpow(Real(2),100)
1267650600228229401496703205376
>>> pi(7)
3.1415926
```
You can also run `precreal_test`, which tests three features of this package.
changelog:
* 1.0.0 First version
* 1.0.1 Fixed a setup.py bug
* 1.0.2 Fixed the bug that pi computing results in 10 more digits
Raw data
{
"_id": null,
"home_page": "https://github.com/none-None1/precreal",
"name": "precreal",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3",
"maintainer_email": "",
"keywords": "arithmetic,calculating,real number",
"author": "None1",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/67/7f/0b8b00710b17b7cf2a3b81bb79920fbde8357c382a989d0af5435e687ca7/precreal-1.0.2.tar.gz",
"platform": null,
"description": "This is a Python package to do exact real arithmetic, the following is an example using it:\r\n\r\n```python\r\nfrom precreal import Real,intpow,pi\r\n\r\n>>> 0.1+0.2==0.3 # Precision loss\r\n\r\nFalse\r\n\r\n>>> Real(\"0.1\")+Real(\"0.2\")==Real(\"0.3\") # The Real class has NO precision loss when doing arithmetic\r\n\r\nTrue\r\n\r\n>>> intpow(Real(2),100)\r\n\r\n1267650600228229401496703205376\r\n\r\n>>> pi(7)\r\n3.1415926\r\n```\r\n\r\nYou can also run `precreal_test`, which tests three features of this package.\r\n\r\nchangelog:\r\n\r\n* 1.0.0 First version\r\n* 1.0.1 Fixed a setup.py bug\r\n* 1.0.2 Fixed the bug that pi computing results in 10 more digits\r\n",
"bugtrack_url": null,
"license": "",
"summary": "A package providing a fraction-based Real class that allows you to do exact real arithmetic, along with some algorithms",
"version": "1.0.2",
"project_urls": {
"Homepage": "https://github.com/none-None1/precreal"
},
"split_keywords": [
"arithmetic",
"calculating",
"real number"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "11c4a043faeff3995483e82c314412d47f26b7aaa308b5be0311caffd7e3b44b",
"md5": "e721b71ba0ec33b6aca919a6ac129606",
"sha256": "f9ae38077e52b9479792a3d7115e100692f195b7b83de28fdc67cf9fc9a6d80a"
},
"downloads": -1,
"filename": "precreal-1.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "e721b71ba0ec33b6aca919a6ac129606",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3",
"size": 6428,
"upload_time": "2024-03-14T13:46:42",
"upload_time_iso_8601": "2024-03-14T13:46:42.868012Z",
"url": "https://files.pythonhosted.org/packages/11/c4/a043faeff3995483e82c314412d47f26b7aaa308b5be0311caffd7e3b44b/precreal-1.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "677f0b8b00710b17b7cf2a3b81bb79920fbde8357c382a989d0af5435e687ca7",
"md5": "86ab20b04502fed4b73041247438f11c",
"sha256": "72777565aec9db4229f4552fcae18064fb32510630919f4cf4c71cfd87ba7ba2"
},
"downloads": -1,
"filename": "precreal-1.0.2.tar.gz",
"has_sig": false,
"md5_digest": "86ab20b04502fed4b73041247438f11c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3",
"size": 5138,
"upload_time": "2024-03-14T13:46:45",
"upload_time_iso_8601": "2024-03-14T13:46:45.796775Z",
"url": "https://files.pythonhosted.org/packages/67/7f/0b8b00710b17b7cf2a3b81bb79920fbde8357c382a989d0af5435e687ca7/precreal-1.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-14 13:46:45",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "none-None1",
"github_project": "precreal",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "precreal"
}