Skip to main content

A package providing a fraction-based Real class that allows you to do exact real arithmetic, along with some algorithms

Project description

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

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

precreal-1.0.2.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

precreal-1.0.2-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file precreal-1.0.2.tar.gz.

File metadata

  • Download URL: precreal-1.0.2.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.0

File hashes

Hashes for precreal-1.0.2.tar.gz
Algorithm Hash digest
SHA256 72777565aec9db4229f4552fcae18064fb32510630919f4cf4c71cfd87ba7ba2
MD5 86ab20b04502fed4b73041247438f11c
BLAKE2b-256 677f0b8b00710b17b7cf2a3b81bb79920fbde8357c382a989d0af5435e687ca7

See more details on using hashes here.

File details

Details for the file precreal-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: precreal-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 6.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.0

File hashes

Hashes for precreal-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f9ae38077e52b9479792a3d7115e100692f195b7b83de28fdc67cf9fc9a6d80a
MD5 e721b71ba0ec33b6aca919a6ac129606
BLAKE2b-256 11c4a043faeff3995483e82c314412d47f26b7aaa308b5be0311caffd7e3b44b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page