This is a Python package to do exact real arithmetic, the following is an example using it:
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
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
precreal-1.0.3.tar.gz
(5.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file precreal-1.0.3.tar.gz.
File metadata
- Download URL: precreal-1.0.3.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
917408e38604f0faf9aecad310b133929af5b9bf41b9281d8260810c21bd9bf3
|
|
| MD5 |
28a869815a1ab1aaf07d35a297aa7825
|
|
| BLAKE2b-256 |
cf1050e2634340ccacccd027dde3e8cca45d905e34bc4fac98fadd9b54da4280
|
File details
Details for the file precreal-1.0.3-py3-none-any.whl.
File metadata
- Download URL: precreal-1.0.3-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7139d1acf57e30ddefa80bdbd2abed0fdd1f280f46aafe8e8688adb9f83875b4
|
|
| MD5 |
53d919c51beedafd6764884889ee2e9c
|
|
| BLAKE2b-256 |
7224c919fbc356e7f66302bad6a251bf41c3ce417b6383ffb192b3ebe49bfa41
|