{"id":17216870,"url":"https://github.com/xethron/bignum","last_synced_at":"2025-04-13T23:22:52.588Z","repository":{"id":57083887,"uuid":"152890956","full_name":"Xethron/bignum","owner":"Xethron","description":"A smart wrapper for bcmath that allows","archived":false,"fork":false,"pushed_at":"2023-09-20T07:21:46.000Z","size":65,"stargazers_count":5,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-27T13:39:52.494Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"PHP","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/Xethron.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":"2018-10-13T16:23:19.000Z","updated_at":"2023-08-01T14:56:06.000Z","dependencies_parsed_at":"2024-10-15T03:52:44.414Z","dependency_job_id":null,"html_url":"https://github.com/Xethron/bignum","commit_stats":{"total_commits":4,"total_committers":1,"mean_commits":4.0,"dds":0.0,"last_synced_commit":"f0000384a9118abc70d45683b734c2f5e0266760"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xethron%2Fbignum","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xethron%2Fbignum/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xethron%2Fbignum/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Xethron%2Fbignum/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Xethron","download_url":"https://codeload.github.com/Xethron/bignum/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248795176,"owners_count":21162725,"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-15T03:42:33.936Z","updated_at":"2025-04-13T23:22:52.558Z","avatar_url":"https://github.com/Xethron.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bignum library for PHP\n[![codecov](https://codecov.io/gh/Xethron/bignum/graph/badge.svg?token=77SL86KV17)](https://codecov.io/gh/Xethron/bignum)\n\nIntelligent wrapper for BCMath.\n\n## Why use this library?\nBCMath is a great library, but it has some shortfalls.\nThis library aims to address those shortfalls.\n\n### Features\n* Adds serialisation of numbers:\n  * Serialises Floats\n  * Serialises Strings\n  * Understands Scientific Notation\n  * Throws exceptions for invalid values\n* Adds Rounding\n* All results are rounded\n\n## Installation\nThe recommended way to install this is through composer:\n\n```bash\ncomposer require \"xethron/bignum\"\n```\n\n## Usage\n```php\n\u003c?php\n\nuse Xethron\\Bignum\\Math;\n\nMath::add(7, 3); // 10\nMath::subtract('1', '0.000001'); // 0.999999\n\n// Default 20 precision\nMath::divide(1, 3); // 0.33333333333333333333\n\n// Set precision to 4 decimals\n$third = Math::divide(1, 3, 4); // 0.3333\n// Set precision to 2, resulting in rounding 0.9999 to 1\n$one = Math::multiply($third, 3, 2); // 1\n\nMath::round(0.5678); // 1\nMath::round(0.16, 1); // 0.2\n```\n\n## Contribution Guidelines\nPlease open any issues for discussion before starting any work to avoid new features not getting approved.\n\nThis project follows the Symfony coding standards.\n\n## Contributors\nBernhard Breytenbach ([@BBreyten](https://twitter.com/BBreyten))\n\n## License\nThe library is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxethron%2Fbignum","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxethron%2Fbignum","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxethron%2Fbignum/lists"}