{"id":19830729,"url":"https://github.com/crytic/roundme","last_synced_at":"2025-05-01T15:30:39.982Z","repository":{"id":207123126,"uuid":"718480872","full_name":"crytic/roundme","owner":"crytic","description":null,"archived":false,"fork":false,"pushed_at":"2024-05-31T12:43:19.000Z","size":207,"stargazers_count":91,"open_issues_count":4,"forks_count":7,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-06T15:06:33.745Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/crytic.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-14T06:59:31.000Z","updated_at":"2025-02-22T14:33:58.000Z","dependencies_parsed_at":"2023-11-14T08:26:44.968Z","dependency_job_id":"079c23d7-31e6-407c-ac9c-5357a116df70","html_url":"https://github.com/crytic/roundme","commit_stats":null,"previous_names":["crytic/roundme"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crytic%2Froundme","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crytic%2Froundme/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crytic%2Froundme/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/crytic%2Froundme/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/crytic","download_url":"https://codeload.github.com/crytic/roundme/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251898520,"owners_count":21661838,"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","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":"2024-11-12T11:25:02.975Z","updated_at":"2025-05-01T15:30:35.356Z","avatar_url":"https://github.com/crytic.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# roundme\n\n`roundme` is a human-assisted rounding analyzer. It helps its operator determine whether an arithmetic operation should round up or down.\n\n## Features\n- Recommends whether an arithmetic operation needs to round up or down\n- Generates LaTeX-based reports in PDF\n\n## Rules\n\n`rounding()` is the expected rounding direction for the result (up or down)\n\n- `A + B =\u003e rounding(A), rounding(B)` (addition does not change the rounding direction)\n- `A - B =\u003e rounding(A), ! rounding(B)` (the rounding direction of the substracted element is inverse of the expected rounding)\n- `A * B =\u003e rounding(A), rounding(B), rounding(*) ` (multiplication does not change the rounding direction)\n- `A / B =\u003e rounding(A), ! rounding(B), rounding(/)` (the rounding direction of the denominator is the inverse of the expected rounding)\n- `A ** B`\n  - `If A\u003e=1 =\u003e rounding(A), rounding(B)`\n  - `If A\u003c1 =\u003e rounding(A), ! rounding(B)` (if A is below 1, the rounding direction of the exponent is the inverse of the expected rounding)\n\n## How to use\n\n- Run `roundme init-sample` to generate a default configuration file. \n- Run `roundme init` to generate user configuration file. \n- Run `roundme analyze` to analyze the configuration file\n- Run `roundme analyze --output-format pdf` to generate a PDF (require [latexmk](https://mg.readthedocs.io/latexmk.html))\n\nRunning `roundme analyze --output-format pdf` on the default configuration will generate the following:\n\u003cimg src=\"./images/example.png\" alt=\"Example\" width=\"50%\" /\u003e\n\n### Configuration\n\n`roundme` relies on a configuration file:\n```yaml\nformula: a * b / c \nround_up: true\nless_than_one: [\"a * b\"] # optional\ngreater_than_one: [\"c\"] # optional\n```\n- `formula` contains the formula to be analyze\n- `round_up` determines if the result of the formula should round up or down\n- `less_than_one` is used for the `**` [rules](#rules) *(raw string comparison and sensible to space)*\n- `greater_than_one` is used for the `**` [rules](#rules) *(raw string comparison and sensible to space)*\n\nSee the [balancer V2](./examples/balancer/README.md) example.\n\n## Install\n\nInstall with\n```bash\ncargo install roundme\n```\n\nTo install the latest GitHub version\n```bash\ngit clone git@github.com:crytic/roundme.git\ncd roundme\ncargo install --path .\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrytic%2Froundme","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcrytic%2Froundme","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcrytic%2Froundme/lists"}