{"id":17971184,"url":"https://github.com/cairoeth/solgauss","last_synced_at":"2025-05-05T23:15:15.565Z","repository":{"id":252319256,"uuid":"832442186","full_name":"cairoeth/solgauss","owner":"cairoeth","description":"🔎 Highly optimized Solidity library of statistical functions rationally approximated","archived":false,"fork":false,"pushed_at":"2024-10-15T04:04:03.000Z","size":2573,"stargazers_count":22,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-05T23:15:13.556Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Solidity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cairoeth.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-07-23T03:24:10.000Z","updated_at":"2025-02-11T14:55:17.000Z","dependencies_parsed_at":"2024-08-09T01:42:56.586Z","dependency_job_id":"72be6368-c059-46e3-a86f-7f23e8c85f9f","html_url":"https://github.com/cairoeth/solgauss","commit_stats":null,"previous_names":["cairoeth/solcdf","cairoeth/solgauss"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cairoeth%2Fsolgauss","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cairoeth%2Fsolgauss/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cairoeth%2Fsolgauss/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cairoeth%2Fsolgauss/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cairoeth","download_url":"https://codeload.github.com/cairoeth/solgauss/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252590633,"owners_count":21772940,"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-10-29T15:37:16.499Z","updated_at":"2025-05-05T23:15:15.543Z","avatar_url":"https://github.com/cairoeth.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🔎 solgauss\n\n[![CI][ci-badge]][ci-url]\n\nHighly optimized Solidity library for statistical functions rationally approximated with an error of less than 1 × 10⁻⁸, including `erfc`, `erfinv`, `erfcinv`, `ppf`, and `cdf`.\n\n## ⚙️ Installation\n\nTo install with [**Foundry**](https://github.com/foundry-rs/foundry):\n\n```sh\nforge install cairoeth/solgauss\n```\n\n## ⛽ Gas Benchmarks\n\nTo run the gas benchmark: `forge t --gas-report --fuzz-seed 0x123`\n\n### `cdf`\n\n| Function           |  min |  avg | median |  max |\n|--------------------|------|------|--------|------|\n| cdf (solgauss)     |  519 |  610 |    519 |  833 |\n| cdf (solidity-cdf) |  492 |  617 |    492 |  914 |\n| cdf (gud-cdf)      |  704 |  736 |    704 |  841 |\n| cdf (solstat)      |  916 | 4258 |   5137 | 5137 |\n\n### `erfc`\n\n| Function        |  min |  avg | median |  max |\n|-----------------|------|------|--------|------|\n| erfc (solgauss)   |  687 |  688 |    687 |  693 |\n| erfc (gud-cdf)  |  569 |  570 |    569 |  603 |\n| erfc (solstat)  | 4436 | 4453 |   4436 | 4543 |\n\n### `erfcinv`\n\n| Function |  min |  avg | median |  max |\n|----------|------|------|--------|------|\n| erfcinv  |  669 |  828 |    783 | 1847 |\n\n### `erfinv`\n\n| Function |  min |  avg | median |  max |\n|----------|------|------|--------|------|\n| erfinv   |  604 |  749 |    718 | 1796 |\n\n### `ppf`\n\n| Function |  min |  avg | median |  max |\n|----------|------|------|--------|------|\n| ppf      | 2001 | 2001 |   2001 | 2001 |\n\n## ✅ Tests\n\nRun the following for the dependencies used in the (differential) tests:\n\n1. `python -m venv venv \u0026\u0026 source venv/bin/activate`\n2. `pip install mpmath`\n\nTo run the tests: `forge t`\n\n## 👇 Acknowledgements\n\nThis repository is inspired by or directly modified from many sources, primarily:\n\n- [gud-cdf](https://github.com/Philogy/gud-cdf): codification script\n- [Rational Chebyshev Approximation Using Linear Equations](https://link.springer.com/article/10.1007/BF02162506)\n\n[ci-badge]: https://github.com/cairoeth/solgauss/actions/workflows/test.yml/badge.svg\n[ci-url]: https://github.com/cairoeth/solgauss/actions/workflows/test.yml\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcairoeth%2Fsolgauss","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcairoeth%2Fsolgauss","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcairoeth%2Fsolgauss/lists"}