{"id":20031746,"url":"https://github.com/astrodynamic/arithmetic-calculations-in-c-for-calculator","last_synced_at":"2026-06-09T11:31:17.976Z","repository":{"id":162081522,"uuid":"636692705","full_name":"Astrodynamic/Arithmetic-calculations-in-C-for-calculator","owner":"Astrodynamic","description":"Library for arithmetic string calculator in C.","archived":false,"fork":false,"pushed_at":"2023-05-05T12:39:20.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-03-02T05:27:47.746Z","etag":null,"topics":["c","calculator","cmake","library","makefile","math","parser"],"latest_commit_sha":null,"homepage":"","language":"C","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/Astrodynamic.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-05-05T12:30:09.000Z","updated_at":"2023-05-10T11:35:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"ea6319e3-afcb-4904-ba50-974c6915f157","html_url":"https://github.com/Astrodynamic/Arithmetic-calculations-in-C-for-calculator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Astrodynamic/Arithmetic-calculations-in-C-for-calculator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Astrodynamic%2FArithmetic-calculations-in-C-for-calculator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Astrodynamic%2FArithmetic-calculations-in-C-for-calculator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Astrodynamic%2FArithmetic-calculations-in-C-for-calculator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Astrodynamic%2FArithmetic-calculations-in-C-for-calculator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Astrodynamic","download_url":"https://codeload.github.com/Astrodynamic/Arithmetic-calculations-in-C-for-calculator/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Astrodynamic%2FArithmetic-calculations-in-C-for-calculator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34105565,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"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":["c","calculator","cmake","library","makefile","math","parser"],"created_at":"2024-11-13T09:34:35.165Z","updated_at":"2026-06-09T11:31:17.959Z","avatar_url":"https://github.com/Astrodynamic.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Arithmetic calculation Library\n\nThis library provides functionality for arithmetic calculations in string calculator for C language.\n\n## Build\n\nTo build the library, please follow the steps below:\n1. Clone the repository\n2. Run `make` in the project directory.\n\n## Usage\n\nAfter building the library, you can use it by including the `calculation.h` header file and calling the `calculation` function in your C code. The `calculation` function takes a deque of lexemes in Reverse Polish Notation and a double value for the variable `x`, and returns a double value which is the result of the calculation.\n\n## Dependencies\n\nThis library depends on the following libraries:\n* C Standard Library\n* Math Library\n\n## Development\n\nTo contribute to this library, please follow the steps below:\n1. Clone the repository\n2. Run `make` in the project directory to build the library.\n3. Make changes to the source code.\n4. Run `make` again to rebuild the library.\n5. Test your changes.\n6. Submit a pull request.\n\n## License\n\nThis library is licensed under the [MIT LICENSE](LICENSE).\n\n## Example Build and Usage\n\nAssuming the library is built as `ArithmeticCalculation.a` and the following code is in a file named `main.c`.\n\n```c\n#include \u003cstdio.h\u003e\n#include \"calculation.h\"\n\nint main() {\n  lexeme_t *lexemes = NULL;\n  Deque *rpn = init_deque();\n\n  // populate lexemes and rpn with appropriate values\n\n  double result = calculation(rpn, 5.0);\n\n  printf(\"Result: %lf\\n\", result);\n  return 0;\n}\n```\n\nTo compile and link the code with the library:\n\n```bash\n$ gcc -c main.c -o main.o\n$ gcc main.o -L. -ArithmeticCalculation -o calculator\n```\n\nThis will create an executable named `calculator`. Running it will print the result of the calculation.\n\n```bash\n$ ./calculator\nResult: 25.000000\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastrodynamic%2Farithmetic-calculations-in-c-for-calculator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fastrodynamic%2Farithmetic-calculations-in-c-for-calculator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastrodynamic%2Farithmetic-calculations-in-c-for-calculator/lists"}