Skip to main content

Python library for rounding numbers (with expected results)

Project description

Version Documentation Python Versions Coverage Status Download Stats

This is the sigfig Python package used for rounding numbers (with expected results).

>>> round(0.25, 1)
0.2
>>> from sigfig import round
>>> round(0.25, decimals=1)
0.3
>>> round(3.14159, sigfigs=2)
3.1
>>> round(3.14159, uncertainty=0.003639)
'3.142 ± 0.004'
>>> round('3.141592653589793', '0.00000002567', format='Drake')
'3.141 592 654(26)'

Key Features:

  • round numbers by significant figures/digits

  • round numbers by decimal places

  • round numbers by uncertainty/error

  • format numbers in a variety of common styles & notations

  • read in numbers of any type

In-depth documentation can be found here:

Useful links:

Please direct any comments/suggestions/feedback/bugs to the issues page or submit a pull request

Thanks for downloading :)

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

sigfig-1.3.19.tar.gz (14.2 kB view details)

Uploaded Source

Built Distribution

sigfig-1.3.19-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

Details for the file sigfig-1.3.19.tar.gz.

File metadata

  • Download URL: sigfig-1.3.19.tar.gz
  • Upload date:
  • Size: 14.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for sigfig-1.3.19.tar.gz
Algorithm Hash digest
SHA256 a9e4fa37aa7595cc01b7207bfabf86cccd2d3edfddcdaa925ffd57dd77efcd9e
MD5 e6e203c0b67b8e777b3623d13247a7d7
BLAKE2b-256 d8a190bc16852efe100582b9d6c43c495aa8708fe67e72d3dfb44964463604e1

See more details on using hashes here.

Provenance

The following attestation bundles were made for sigfig-1.3.19.tar.gz:

Publisher: increment_test_publish.yaml on drakegroup/sigfig

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file sigfig-1.3.19-py3-none-any.whl.

File metadata

  • Download URL: sigfig-1.3.19-py3-none-any.whl
  • Upload date:
  • Size: 10.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for sigfig-1.3.19-py3-none-any.whl
Algorithm Hash digest
SHA256 7bde0715e1a0cddb93c3ed3b9f8f20bf4cc77bbb47c570fe6fbd7b43aa6fd56c
MD5 0b300469b435738fd8dda1bc4ed89d67
BLAKE2b-256 692918af3de86d94b13d49ec9a4a8cf164187fffb22431c2f3f3e7836339d631

See more details on using hashes here.

Provenance

The following attestation bundles were made for sigfig-1.3.19-py3-none-any.whl:

Publisher: increment_test_publish.yaml on drakegroup/sigfig

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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