{"id":16866470,"url":"https://github.com/saulecabrera/leibniz","last_synced_at":"2025-03-22T07:30:41.585Z","repository":{"id":57515698,"uuid":"127684531","full_name":"saulecabrera/leibniz","owner":"saulecabrera","description":"Math expression parser and evaluator","archived":false,"fork":false,"pushed_at":"2018-05-06T14:30:54.000Z","size":21,"stargazers_count":22,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-18T09:11:27.675Z","etag":null,"topics":["evaluator","math-expression-parser"],"latest_commit_sha":null,"homepage":null,"language":"Erlang","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/saulecabrera.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}},"created_at":"2018-04-02T00:58:33.000Z","updated_at":"2023-05-18T09:25:15.000Z","dependencies_parsed_at":"2022-08-28T16:51:13.859Z","dependency_job_id":null,"html_url":"https://github.com/saulecabrera/leibniz","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saulecabrera%2Fleibniz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saulecabrera%2Fleibniz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saulecabrera%2Fleibniz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saulecabrera%2Fleibniz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saulecabrera","download_url":"https://codeload.github.com/saulecabrera/leibniz/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244924822,"owners_count":20532872,"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":["evaluator","math-expression-parser"],"created_at":"2024-10-13T14:50:42.219Z","updated_at":"2025-03-22T07:30:37.721Z","avatar_url":"https://github.com/saulecabrera.png","language":"Erlang","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Leibniz\n[![Build Status](https://travis-ci.org/saulecabrera/leibniz.svg?branch=master)](https://travis-ci.org/saulecabrera/leibniz)\n[![codecov](https://codecov.io/gh/saulecabrera/leibniz/branch/master/graph/badge.svg)](https://codecov.io/gh/saulecabrera/leibniz)\n\nLeibniz is a pure erlang/elixir math expression parser and evaluator.\n\n## Installation\n\n```elixir\ndefp deps() do\n  [{:leibniz, \"~\u003e 1.0.0\"}]\nend\n```\n\n## Usage\n\n[Documentation](https://hexdocs.pm/leibniz/api-reference.html)\n\nLeibniz provides two core functionalities, evaluating valid math expressions and evaluating valid math expression in a given context.\n\n#### Examples\n\nEvaluating simple math expressions\n\n```elixir\nLeibniz.eval(\"1 + 1\")\n\n{:ok, 2}\n\n```\n\nEvaluating math expressions in a given context\n\n```elixir\nLeibniz.eval(\"10 * foo\", foo: 10)\n\n{:ok, 100}\n```\n\n```elixir\nLeibniz.eval(\"1 * baz\")\n{:error, \"value expected for the following dependencies: baz\"}\n```\n\n## TODO\n\n- [ ] Improve errors\n- [ ] Provide a `parse/1` function\n- [ ] Provide a `depencies/1` function\n- [ ] Add trigonometric and other math functions\n\n## LICENSE\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaulecabrera%2Fleibniz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaulecabrera%2Fleibniz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaulecabrera%2Fleibniz/lists"}