All Projects → saulecabrera → leibniz

saulecabrera / leibniz

Licence: MIT license
Math expression parser and evaluator

Programming Languages

erlang
1774 projects
elixir
2628 projects

Projects that are alternatives of or similar to leibniz

mpc
Secure Multi-Party Computation (MPC) with Go. This project implements secure two-party computation with Garbled circuit protocol.
Stars: ✭ 41 (+105%)
Mutual labels:  evaluator
MathImprove
Modify and Improve math expressions.
Stars: ✭ 13 (-35%)
Mutual labels:  math-expression-parser
Expr
Expression language for Go
Stars: ✭ 2,123 (+10515%)
Mutual labels:  evaluator
booleval
Header-only C++17 library for evaluating logical expressions.
Stars: ✭ 54 (+170%)
Mutual labels:  evaluator
jseval
Evaluate JavaScript on a URL through headless Chrome browser.
Stars: ✭ 19 (-5%)
Mutual labels:  evaluator
lispy
Learning with Peter Norvig's lis.py interpreter
Stars: ✭ 133 (+565%)
Mutual labels:  evaluator
eval-estree-expression
Safely evaluate JavaScript (estree) expressions, sync and async.
Stars: ✭ 22 (+10%)
Mutual labels:  evaluator
fast-formula-parser
Parse and evaluate MS Excel formula in javascript.
Stars: ✭ 341 (+1605%)
Mutual labels:  evaluator
PySODEvalToolkit
PySODEvalToolkit: A Python-based Evaluation Toolbox for Salient Object Detection and Camouflaged Object Detection
Stars: ✭ 59 (+195%)
Mutual labels:  evaluator
ADEM
TOWARDS AN AUTOMATIC TURING TEST: LEARNING TO EVALUATE DIALOGUE RESPONSES
Stars: ✭ 25 (+25%)
Mutual labels:  evaluator
pianola
A declarative function composition and evaluation engine.
Stars: ✭ 18 (-10%)
Mutual labels:  evaluator
evaluator
No description or website provided.
Stars: ✭ 35 (+75%)
Mutual labels:  evaluator

Leibniz

Build Status codecov

Leibniz is a pure erlang/elixir math expression parser and evaluator.

Installation

defp deps() do
  [{:leibniz, "~> 1.0.0"}]
end

Usage

Documentation

Leibniz provides two core functionalities, evaluating valid math expressions and evaluating valid math expression in a given context.

Examples

Evaluating simple math expressions

Leibniz.eval("1 + 1")

{:ok, 2}

Evaluating math expressions in a given context

Leibniz.eval("10 * foo", foo: 10)

{:ok, 100}
Leibniz.eval("1 * baz")
{:error, "value expected for the following dependencies: baz"}

TODO

  • Improve errors
  • Provide a parse/1 function
  • Provide a depencies/1 function
  • Add trigonometric and other math functions

LICENSE

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].