{"id":41369624,"url":"https://github.com/a-h-ismail/libtmsolve","last_synced_at":"2026-01-31T11:03:17.282Z","repository":{"id":157960969,"uuid":"583916616","full_name":"a-h-ismail/libtmsolve","owner":"a-h-ismail","description":"Library for parsing mathematical expressions and manipulating matrices.","archived":false,"fork":false,"pushed_at":"2026-01-23T06:26:22.000Z","size":1489,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-24T00:27:57.941Z","etag":null,"topics":["c","matrix","numerical-methods"],"latest_commit_sha":null,"homepage":"https://a-h-ismail.gitlab.io/libtmsolve-docs/","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/a-h-ismail.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-12-31T12:56:22.000Z","updated_at":"2026-01-23T06:16:18.000Z","dependencies_parsed_at":"2026-01-31T11:02:43.096Z","dependency_job_id":null,"html_url":"https://github.com/a-h-ismail/libtmsolve","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/a-h-ismail/libtmsolve","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-h-ismail%2Flibtmsolve","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-h-ismail%2Flibtmsolve/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-h-ismail%2Flibtmsolve/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-h-ismail%2Flibtmsolve/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/a-h-ismail","download_url":"https://codeload.github.com/a-h-ismail/libtmsolve/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/a-h-ismail%2Flibtmsolve/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28939508,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T10:18:23.202Z","status":"ssl_error","status_checked_at":"2026-01-31T10:18:22.693Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","matrix","numerical-methods"],"created_at":"2026-01-23T09:01:38.834Z","updated_at":"2026-01-31T11:03:17.276Z","avatar_url":"https://github.com/a-h-ismail.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Introduction\n\nlibtmsolve is a math library for expression evaluation (both scientific and integer based), basic manipulation of matrices and some other useful features (function manipulation, factorization...).\n\nFull documentation is available [here](https://a-h-ismail.gitlab.io/libtmsolve-docs/).\n\n## Features\n\n- Thread safe and minimal.\n- Needs almost no dependency.\n- Parse and evaluate both regular (floating point) and integer based expressions.\n- Integer parser supports varying the word size (up to 64 bit) using a global integer mask.\n- Supports variables and functions defined at runtime.\n- Basic matrix manipulation.\n- Integer factorization and fraction reduction.\n- Convert a value to its fractional form (if possible).\n- Suitable for interactive use with its support for user variables and functions.\n\n## Usage Examples\n\nAs a normal calculator:\n\n```C\n#include \u003ctmsolve/libtmsolve.h\u003e\n// \u003c...\u003e Whatever function you are in\ndouble answer;\nchar light_speed[] = {\"sqrt(1/(8.8541878128e-12*(4e-7*pi)))\"};\n\n// Expected answer: 299792458.08161\nanswer = tms_solve(light_speed);\n\n// By default, tms_solve() will switch to complex calculations if no real answer is found, and will print errors to stderr\n\n// This variant provides more control using options (NO_LOCK, ENABLE_COMPLEX, PRINT_ERRORS)\n// 0 means defaults (use locks, no error printing, no complex)\nanswer = tms_solve_e(light_speed, 0, NULL);\n```\n\nWith integer variables:\n\n```C\n#include \u003ctmsolve/libtmsolve.h\u003e\n// \u003c...\u003e Whatever function you are in\nchar int_expression[] = {\"821 \u0026 0xFF + 0b1 | 0b110\"};\nint64_t result;\n\n// The return value reports if the operation succeeded or not\nstatus = tms_int_solve(int_expression, \u0026result);\n\n// Similarly to the double variant, you can use the more advanced tms_int_solve_e\nstatus = tms_int_solve_e(int_expression, \u0026result, 0, NULL);\n```\n\nCheck the relevant documentation for more details.\n\n## Linking to the Library\n\nTo build your binary and link to this library:\n`gcc -ltmsolve \u003cother options\u003e`\n\n## Tips\n\n- Runtime variables and functions manipulation is defined in `internals.h`.\n- Documentation about the parser, evaluator, and some useful features like factorization can be found in `parser.h`, `evaluator.h` and `scientific.h`.\n- Extended functions (like integration) are defined in `function.h`.\n- Integer variant of the parser is in `int_parser.h`, its extended functions are in `bitwise.h`.\n- For functions that assist in manipulating strings (char *), refer to `string_tools.h`.\n- For matrix related features, refer to `matrix.h`.\n- Error handling is defined in `error_handler.h`.\n- All error messages are defined in `m_errors.h`.\n\n## Note\n\nThe library uses double precision floating point variables with complex extension for its \"scientific\" operations,\nand uses `int64_t` for the integer only version of the parser and evaluator.\n\n## License\n\nThis library is licensed under the GNU LGPL-2.1-only.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa-h-ismail%2Flibtmsolve","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fa-h-ismail%2Flibtmsolve","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fa-h-ismail%2Flibtmsolve/lists"}