{"id":20031758,"url":"https://github.com/astrodynamic/math-library-in-c","last_synced_at":"2025-10-24T01:30:06.622Z","repository":{"id":161625078,"uuid":"636298892","full_name":"Astrodynamic/Math-Library-in-C","owner":"Astrodynamic","description":"CustomMath library is a C language implementation of the `math.h` library, offering basic mathematical functions like sine, cosine, logarithms, etc. It has no external dependencies and is licensed under MIT. To use it, you need to link it with your project and include its header file in your C source code.","archived":false,"fork":false,"pushed_at":"2023-05-05T04:01:46.000Z","size":11,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-03-02T05:27:47.328Z","etag":null,"topics":["c","check","cmake","library","makefile","math","testing"],"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-04T14:32:58.000Z","updated_at":"2024-09-02T23:16:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"12c13bb7-bc75-4e9d-b4e9-020cdcd4dbaf","html_url":"https://github.com/Astrodynamic/Math-Library-in-C","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Astrodynamic/Math-Library-in-C","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Astrodynamic%2FMath-Library-in-C","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Astrodynamic%2FMath-Library-in-C/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Astrodynamic%2FMath-Library-in-C/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Astrodynamic%2FMath-Library-in-C/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Astrodynamic","download_url":"https://codeload.github.com/Astrodynamic/Math-Library-in-C/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Astrodynamic%2FMath-Library-in-C/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267213513,"owners_count":24053912,"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","status":"online","status_checked_at":"2025-07-26T02:00:08.937Z","response_time":62,"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","check","cmake","library","makefile","math","testing"],"created_at":"2024-11-13T09:34:37.532Z","updated_at":"2025-10-24T01:30:01.547Z","avatar_url":"https://github.com/Astrodynamic.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CustomMath library\n\nThis is a custom implementation of the `math.h` library in C language. The `CustomMath` library provides basic mathematical functions, such as sine, cosine, logarithms, etc.\n\n## Build\n\nTo build the `CustomMath` library, you need to have CMake installed on your system. \n\nTo build the library, run the following command:\n```\ncmake -S . -B ./build\ncmake --build ./build\n```\n\nTo clean the build directory, run the following command:\n```\nmake clean\n```\n\n## Usage\n\nTo use the `CustomMath` library in your project, you need to link it with your program. \n\nAdd the following lines to your CMakeLists.txt file:\n```cmake\nadd_subdirectory(path/to/CustomMath)\ntarget_link_libraries(your_project CustomMath)\n```\n\nInclude the header file in your C source code:\n```c\n#include \"castom_math.h\"\n```\n\nThen, you can use any function provided by the `CustomMath` library, such as `castom_sin()` or `castom_log()`.\n\n### Overview of some \"math.h\" functions\n\n| No. | Function | Description |\n| --- | -------- | ----------- |\n| 1 | `int castom_abs(int x)` | computes absolute value of an integer value |\n| 2 | `long double castom_acos(double x)` | computes arc cosine |\n| 3 | `long double castom_asin(double x)` | computes arc sine |\n| 4 | `long double castom_atan(double x)` | computes arc tangent |\n| 5 | `long double castom_ceil(double x)` | returns the nearest integer not less than the given value |\n| 6 | `long double castom_cos(double x)` | computes cosine |\n| 7 | `long double castom_exp(double x)` | returns e raised to the given power |\n| 8 | `long double castom_fabs(double x)` | computes absolute value of a floating-point value |\n| 9 | `long double castom_floor(double x)` | returns the nearest integer not greater than the given value |\n| 10 | `long double castom_fmod(double x, double y)` | remainder of the floating-point division operation |\n| 11 | `long double castom_log(double x)` | computes natural logarithm |\n| 12 | `long double castom_pow(double base, double exp)` | raises a number to the given power |\n| 13 | `long double castom_sin(double x)` | computes sine |\n| 14 | `long double castom_sqrt(double x)` | computes square root |\n| 15 | `long double castom_tan(double x)` | computes tangent |  \n\n\n\n## Dependencies\n\nThe `CustomMath` library has no external dependencies.\n\n## Development\n\nTo run the tests for the `CustomMath` library, you need to have the `check` library installed on your system. \n\nTo build and run the tests, run the following command:\n```\ncmake -S ./test -B ./test/build\ncmake --build ./test/build\ncd ./test/build/\n./TEST\n```\n\nTo check the code for errors and warnings, run the following command:\n```\nmake cppcheck\n```\n\nTo format the code according to the Google C++ style guide, run the following command:\n```\nmake clang-format\n```\n\n## License\n\nThe `CustomMath` library is released under the MIT License. See the [LICENSE](LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastrodynamic%2Fmath-library-in-c","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fastrodynamic%2Fmath-library-in-c","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fastrodynamic%2Fmath-library-in-c/lists"}