{"id":37141251,"url":"https://github.com/pramod-devireddy/go-exprtk","last_synced_at":"2026-01-14T16:34:05.709Z","repository":{"id":105889326,"uuid":"361410419","full_name":"Pramod-Devireddy/go-exprtk","owner":"Pramod-Devireddy","description":"Go Mathematical Expression Toolkit. Run-time mathematical expression parser and evaluation engine.","archived":false,"fork":false,"pushed_at":"2024-12-04T01:51:27.000Z","size":213,"stargazers_count":41,"open_issues_count":7,"forks_count":13,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-12-04T02:35:30.175Z","etag":null,"topics":["expression","expression-evaluator","expression-parser","formula-parser","golang","mathematical-expressions","parser"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/Pramod-Devireddy/go-exprtk","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/Pramod-Devireddy.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":"2021-04-25T11:32:43.000Z","updated_at":"2024-12-04T01:51:31.000Z","dependencies_parsed_at":null,"dependency_job_id":"fd9b4ddf-02c3-46ef-a056-53c552c9b037","html_url":"https://github.com/Pramod-Devireddy/go-exprtk","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/Pramod-Devireddy/go-exprtk","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pramod-Devireddy%2Fgo-exprtk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pramod-Devireddy%2Fgo-exprtk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pramod-Devireddy%2Fgo-exprtk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pramod-Devireddy%2Fgo-exprtk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pramod-Devireddy","download_url":"https://codeload.github.com/Pramod-Devireddy/go-exprtk/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pramod-Devireddy%2Fgo-exprtk/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28426078,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T16:32:27.303Z","status":"ssl_error","status_checked_at":"2026-01-14T16:28:36.419Z","response_time":107,"last_error":"SSL_read: 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":["expression","expression-evaluator","expression-parser","formula-parser","golang","mathematical-expressions","parser"],"created_at":"2026-01-14T16:34:04.955Z","updated_at":"2026-01-14T16:34:05.701Z","avatar_url":"https://github.com/Pramod-Devireddy.png","language":"C++","readme":"\u003cp align=\"center\"\u003e\n    \u003ch1 align=\"center\"\u003e Go Mathematical Expression Toolkit\u003c/h1\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://godoc.org/github.com/Pramod-Devireddy/go-exprtk\"\u003e\n  \t\u003cimg src=\"https://godoc.org/github.com/Pramod-Devireddy/go-exprtk?status.svg\" alt=\"Go Doc Reference\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://travis-ci.com/Pramod-Devireddy/go-exprtk\"\u003e\n  \u003cimg src=\"https://www.travis-ci.com/Pramod-Devireddy/go-exprtk.svg?branch=main\" alt=\"Build Status\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://codecov.io/gh/Pramod-Devireddy/go-exprtk\"\u003e\n  \t\u003cimg src=\"https://codecov.io/gh/Pramod-Devireddy/go-exprtk/branch/main/graph/badge.svg?token=9pNExL9yZt\"/\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://goreportcard.com/report/github.com/Pramod-Devireddy/go-exprtk\"\u003e\n  \t\u003cimg src=\"https://goreportcard.com/badge/github.com/Pramod-Devireddy/go-exprtk\" alt=\"Go Report Card\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\n\nThe Go Expression Toolkit (Go-ExprTk) is a wrapper library based on C++ Mathematical Expression Toolkit Library ([ExprTk](http://www.partow.net/programming/exprtk/)).\n\nIt is a simple to use, easy to integrate and extremely efficient run-time mathematical expression parser and evaluation engine.\n\nGo-ExprTk supports numerous forms of functional, logical and vector processing semantics and is very easily extendible.\n\n## Installation\n\n```bash\ngo get github.com/Pramod-Devireddy/go-exprtk\n```\n\n## Examples\n\n```Go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/Pramod-Devireddy/go-exprtk\"\n)\n\nfunc main() {\n\texprtkObj := exprtk.NewExprtk()\n\tdefer exprtkObj.Delete()\n\n\texprtkObj.SetExpression(\"(x + 2)*(y-2)\")\n\n\texprtkObj.AddDoubleVariable(\"x\")\n\texprtkObj.AddDoubleVariable(\"y\")\n\n\terr := exprtkObj.CompileExpression()\n\tif err != nil {\n\t\tfmt.Println(err.Error())\n\t\treturn\n\t}\n\n\texprtkObj.SetDoubleVariableValue(\"x\", 18)\n\texprtkObj.SetDoubleVariableValue(\"y\", 32)\n\n\tfmt.Println(exprtkObj.GetEvaluatedValue())\n}\n```\n\nCheck out more [Examples](https://github.com/Pramod-Devireddy/go-exprtk/tree/main/examples) \n\n\n## ⚡ Features\n\nThe Go-ExprTk library has the following capabilities:\n\n* Mathematical operators (+, -, *, /, %, ^)\n\n* Functions (min, max, avg, sum, abs, ceil, floor, round, roundn, exp, log, log10, logn, pow, root, sqrt, clamp, inrange, swap)\n\n* Trigonometry (sin, cos, tan, acos, asin, atan, atan2, cosh, cot, csc, sec, sinh, tanh, d2r, r2d, d2g, g2d, hyp)\n\n* Equalities \u0026 Inequalities (=, ==, \u003c\u003e, !=, \u003c, \u003c=, \u003e, \u003e=)\n\n* Assignment (:=, +=, -=, *=, /=, %=)\n\n* Logical operators (and, nand, nor, not, or, xor, xnor, mand, mor)\n\n* Control structures (if-then-else, ternary conditional, switch case, return-statement)\n\n* Loop structures (while loop, for loop, repeat until loop, break, continue)\n\n* Optimization of expressions (constant folding, strength reduction, operator coupling, special functions and dead code elimination)\n\n* String operations (equalities, inequalities, logical operators, concatenation and sub-ranges)\n\n* Expression local variables, vectors and strings\n\n* User defined variables, vectors, strings, constants and function support\n\n* Multivariate function composition\n\n* Multiple sequence point and sub expression support\n\n* Numeric integration and differentiation\n\n* Vector Processing: BLAS-L1 (axpy, axpby, axpb), all/any-true/false, count, rotate-left/right, shift-left/right, sort, nth_element, iota, sum, kahan-sum, dot-product, copy\n\n\n## ❤️ Credits\n\nThis module could not be possible without the [ExprTk](http://www.partow.net/programming/exprtk/) library by [Arash Partow](https://github.com/ArashPartow) and the idea of creating the wrapper module by [Narayana Rao G S](https://twitter.com/narayanraogs)\n\n\nPublished under MIT License","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpramod-devireddy%2Fgo-exprtk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpramod-devireddy%2Fgo-exprtk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpramod-devireddy%2Fgo-exprtk/lists"}