{"id":25441382,"url":"https://github.com/bertcarnell/pysigfig","last_synced_at":"2025-08-09T01:54:52.863Z","repository":{"id":62583498,"uuid":"293181058","full_name":"bertcarnell/pysigfig","owner":"bertcarnell","description":"A package for creating and manipulating floating point numbers accounting for significant figures","archived":false,"fork":false,"pushed_at":"2020-12-30T18:18:22.000Z","size":57,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-15T17:12:40.223Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bertcarnell.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-09-06T01:20:21.000Z","updated_at":"2020-12-30T18:18:24.000Z","dependencies_parsed_at":"2022-11-03T21:48:44.680Z","dependency_job_id":null,"html_url":"https://github.com/bertcarnell/pysigfig","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/bertcarnell/pysigfig","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bertcarnell%2Fpysigfig","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bertcarnell%2Fpysigfig/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bertcarnell%2Fpysigfig/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bertcarnell%2Fpysigfig/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bertcarnell","download_url":"https://codeload.github.com/bertcarnell/pysigfig/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bertcarnell%2Fpysigfig/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269518669,"owners_count":24430640,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-08T02:00:09.200Z","response_time":72,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-17T12:27:58.426Z","updated_at":"2025-08-09T01:54:52.818Z","avatar_url":"https://github.com/bertcarnell.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pysigfig\nA package for creating and manipulating floating point numbers accounting for significant figures\n\n![Python package](https://github.com/bertcarnell/pysigfig/workflows/Python%20package/badge.svg)\n[![PyPI version](https://badge.fury.io/py/pysigfig.svg)](https://pypi.org/project/pysigfig/)\n\n## Quickstart\n\n```{python}\nimport math\n\nimport pysigfig as pysf\n\n\n# a number with 4 singificant digits\nx = pysf.Float(\"1.234\")\n# a number with 3 significant digits\ny = pysf.Float(\"31.1\")\n\nz1 = x + y\nz2 = x * y\n\n# z1 should have tenths digit as the least significant\nprint(z1)\n# z2 should have 3 significant digits\nprint(z2)\n\narea = pysf.Const(math.pi) * pysf.Float(\"2.0\")**2\n# area should have 2 significant digits\nprint(area)\n```\n\n### References\n\nFor a simple overview of arithmetic with significant figures, see the [Wikipedia Page](https://en.wikipedia.org/wiki/Significance_arithmetic).\n\n## Methods of Entry\n\n```{python}\n# Enter a floating point number and specify the number of significant digits\npysf.Float(1.2345, 2)\npysf.Float(1.2, 8)\n\n# Enter the string representation\npysf.Float(\"1.23\") # 3 sig figs\npysf.Float(\"1.230000\") # 7 sig figs\npysf.Float(\"0.0045\") # 2 sig figs\npysf.Float(\"100000\") # 6 sig figs\npysf.Float(\"1.0E+06\") # 2 sig figs\n\n# Enter a constant\npysf.Const(2)\npysf.Const(math.pi)\n```\n\n### Limitations\n\n`pysigfig` cannot accept a string like \"100000\" and assign only one significant digit to it.  However, this can be entered in scientific notation or as a float.\n\n```{python}\n# Enter 100000 with 1 significant figure\npysf.Float(\"1E+05\")\npysf.Float(100000, 1)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbertcarnell%2Fpysigfig","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbertcarnell%2Fpysigfig","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbertcarnell%2Fpysigfig/lists"}