Skip to main content

Python library for rounding numbers (with expected results)

Project description

Version Documentation Python Versions Coverage Status

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

>>> round(0.25, 1)
>>> from sigfig import round
>>> round(0.25, decimals=1)
>>> round(3.14159, sigfigs=2)
>>> 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 and

Thanks for downloading :)

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for sigfig, version 1.2.0
Filename, size File type Python version Upload date Hashes
Filename, size sigfig-1.2.0.tar.gz (11.8 kB) File type Source Python version None Upload date Hashes View
Filename, size sigfig-1.2.0-py3-none-any.whl (8.8 kB) File type Wheel Python version py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page