{"id":15193846,"url":"https://github.com/gutow/round_using_error","last_synced_at":"2026-02-04T11:44:32.356Z","repository":{"id":57462742,"uuid":"442900938","full_name":"gutow/round_using_error","owner":"gutow","description":"Opinionated pretty output of values and their errors rounded based on error.","archived":false,"fork":false,"pushed_at":"2022-12-13T18:46:00.000Z","size":164,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-16T19:30:08.277Z","etag":null,"topics":["latex","python","rounding","significant-digits","significant-figures","uncertainty"],"latest_commit_sha":null,"homepage":"https://gutow.github.io/round_using_error/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gutow.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":"2021-12-29T22:03:13.000Z","updated_at":"2022-03-28T01:31:53.000Z","dependencies_parsed_at":"2023-01-28T14:32:19.955Z","dependency_job_id":null,"html_url":"https://github.com/gutow/round_using_error","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/gutow/round_using_error","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gutow%2Fround_using_error","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gutow%2Fround_using_error/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gutow%2Fround_using_error/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gutow%2Fround_using_error/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gutow","download_url":"https://codeload.github.com/gutow/round_using_error/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gutow%2Fround_using_error/sbom","scorecard":{"id":450239,"data":{"date":"2025-08-11","repo":{"name":"github.com/gutow/round_using_error","commit":"675c6e4e60c7e28efcc13c13894ad43c56069539"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Code-Review","score":0,"reason":"Found 0/27 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: GNU General Public License v3.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-19T08:02:05.199Z","repository_id":57462742,"created_at":"2025-08-19T08:02:05.200Z","updated_at":"2025-08-19T08:02:05.200Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29083229,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-04T03:31:03.593Z","status":"ssl_error","status_checked_at":"2026-02-04T03:29:50.742Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["latex","python","rounding","significant-digits","significant-figures","uncertainty"],"created_at":"2024-09-27T22:04:34.963Z","updated_at":"2026-02-04T11:44:32.339Z","avatar_url":"https://github.com/gutow.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[Introduction](#introduction) | [Install](#install-using-pip) | \n[Default Usage](#default-usage) | \n[Adjusting # of Significant Figures on Error](#adjusting-significant-figures-on-error)\n | [Adjusting cutoffs for switch to scientific notation](#adjusting-the-cutoffs-for-switching-to-scientific-notation)\n| [Render Latex in Jupyter](#render-latex-in-jupyter) | \n[Get Rounded Numbers Instead of Strings](#get-rounded-numbers-for-the-value-and-error) | \n[Comments and Bug Reporting](#issues-or-comments) | [Change Log](#change-log)\n | [License](#this-software-is-distributed-under-the-gnu-v3-license)\n# Round Using Error\n## Introduction\nThis package provides opinionated tools for formatting the output of values \nwith known errors. The general format is `value +/- error`. The values are \nrounded so that the last digit reported for the value is the same order of \nmagnitude as the least significant digit reported on the error. The default \nis to report the error to two significant figures. The opinionated \npart is that the output switches automatically from decimal to scientific \nnotation. Scientific notation is used for values \u003c 0.1 and \u003e 1000. Where the\nswitch occurs can be changed with optional parameters.\n\nThe output is available as:\n* tuple of strings (value, error, power_of_ten);\n* text in format `value +/- error`;\n* latex in the form `value \\pm error`.\n* rounded floating point numbers (value, error)\n\n## Usage\n### Install using pip\n`pip install -U round_using_error`.\n### Default usage:\n```\n\u003e\u003e\u003e from round_using_error import *\n\u003e\u003e\u003e rndwitherr(0.001234, 0.000241)\n('1.23', '0.24', '-3')\n\u003e\u003e\u003e rndwitherr(1299.845, 0.124)\n('1.29985', '0.00012', '3')\n\u003e\u003e\u003e text_rndwitherr(1299.845, 0.124)\n'(1.29985 +/- 0.00012) X 10^3'\n\u003e\u003e\u003e latex_rndwitherr(1299.845, 0.124)\n'(1.29985\\\\pm0.00012)\\\\times 10^{3}'\n\u003e\u003e\u003e rndwitherr(0.001234, 0.000241)\n('1.23', '0.24', '-3')\n\u003e\u003e\u003e text_rndwitherr(0.001234, 0.000241)\n'(1.23 +/- 0.24) X 10^-3'\n\u003e\u003e\u003e latex_rndwitherr(0.001234, 0.000241)\n'(1.23\\\\pm0.24)\\\\times 10^{-3}'\n\u003e\u003e\u003e rndwitherr(0.1234, 0.024)\n('0.123', '0.024', '')\n\u003e\u003e\u003e text_rndwitherr(0.1234, 0.024)\n'0.123 +/- 0.024'\n\u003e\u003e\u003e latex_rndwitherr(0.1234, 0.024)\n'0.123\\\\pm0.024'\n```\n### Adjusting significant figures on error\n```\n\u003e\u003e\u003e from round_using_error import *\n\u003e\u003e\u003e latex_rndwitherr(0.1234, 0.024)\n'0.123\\\\pm0.024'\n\u003e\u003e\u003e rndwitherr(0.001234, 0.000241, errdig = 1)\n('1.2', '0.2', '-3')\n\u003e\u003e\u003e rndwitherr(0.001234, 0.000241, errdig = 3)\n('1.234', '0.241', '-3')\n\u003e\u003e\u003e text_rndwitherr(0.001234, 0.000241, errdig = 3)\n'(1.234 +/- 0.241) X 10^-3'\n\u003e\u003e\u003e latex_rndwitherr(0.001234, 0.000241, errdig = 3)\n'(1.234\\\\pm0.241)\\\\times 10^{-3}'\n```\n### Adjusting the cutoffs for switching to scientific notation\n```\n\u003e\u003e\u003e rndwitherr(1247.325, 1.23, errdig = 1, highmag = 3)\n('1247', '1', '')\n\u003e\u003e\u003e rndwitherr(3.53e-2,2.24e-3, errdig = 1, lowmag = -2)\n('0.035', '0.002', '')\n```\n### Render Latex in Jupyter\n![latex in Jupyter](https://raw.githubusercontent.com/gutow/round_using_error/master/rndwitherr_Jupyter_display.png)\n\n### Get Rounded Numbers for the Value and Error\nIt is possible to get floating point numbers rounded as done by this package\nrather than string representations, using the function `numbers_rndwitherr()`.\nHowever, because of the way floating point numbers are printed, they may not\ndisplay with proper significant figures (see below). Use the \nfunctions described above that return strings to guarantee proper\nsignificant figures.\n\n```\n\u003e\u003e\u003e numbers_rndwitherr(0.002345,0.0072)\n(0.002, 0.007)\n\u003e\u003e\u003e numbers_rndwitherr(2.345864,0.0072)\n(2.3459, 0.0072)\n\u003e\u003e\u003e numbers_rndwitherr(2.345864e-3,0.0072e-2)\n(0.002346, 7.2e-05)\n\u003e\u003e\u003e numbers_rndwitherr(83e-4, 0)\n(0.0083, 0)\n```\n#### Specifying number of error digits\n```\n\u003e\u003e\u003e numbers_rndwitherr(1247.325, 1.23, errdig = 3)\n(1247.33, 1.23)\n```\n#### Default floating point display may not give proper significant figures.\nCompare the output of `numbers_rndwitherr` and `rndwitherr`.\n```\n\u003e\u003e\u003e numbers_rndwitherr(1247.325, 1.23, errdig = 1) # bad\n(1247.0, 1.0)\n\u003e\u003e\u003e rndwitherr(1247.325, 1.23, errdig = 1, highmag = 3) # good\n('1247', '1', '')\n```\n## Issues or Comments\nIdeas, suggestions, bug reports and general comments are welcome . Please\nuse the github repository issues tracker:\n[https://github.com/gutow/round_using_error/issues](https://github.com/gutow/round_using_error/issues).\n\n## Change Log\n* 1.2.0 Introduced `numbers_rndwitherr()` function. Readme.md and docs updates.\n* 1.1.1 More doctests. Tweaked handling of errors larger than values.\n* 1.1.0 Increased error checking. Now raises warning for negative error \n  values. Also fixes an error that occurred with  negative values.\n\n## [This software is distributed under the GNU V3 license](https://gnu.org/licenses)\nThis program is free software: you can redistribute it and/or modify\n    it under the terms of the GNU General Public License as published by\n    the Free Software Foundation, either version 3 of the License, or\n    (at your option) any later version.\n    This program is distributed in the hope that it will be useful,\n    but WITHOUT ANY WARRANTY; without even the implied warranty of\n    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n    GNU General Public License for more details.\n\nCopyright - Jonathan Gutow, 2021, 2022.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgutow%2Fround_using_error","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgutow%2Fround_using_error","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgutow%2Fround_using_error/lists"}