All Projects → newlawrence → Calculate

newlawrence / Calculate

Licence: MIT license
Math Expressions Parser Engine

Programming Languages

C++
36643 projects - #6 most used programming language
CMake
9771 projects

Projects that are alternatives of or similar to Calculate

scope guard
Scope Guard & Defer C++
Stars: ✭ 107 (+256.67%)
Mutual labels:  no-dependencies
BackportCpp
Library of backported modern C++ types to work with C++11
Stars: ✭ 53 (+76.67%)
Mutual labels:  no-dependencies
idlejs
Execute stuff when user is idle or interactive
Stars: ✭ 35 (+16.67%)
Mutual labels:  no-dependencies
acc toolbar
Accessibility Toolbar Plugin
Stars: ✭ 42 (+40%)
Mutual labels:  no-dependencies
Linq.Expression.Optimizer
System.Linq.Expression expressions optimizer. http://thorium.github.io/Linq.Expression.Optimizer
Stars: ✭ 81 (+170%)
Mutual labels:  mathematical-expressions
form-saver
A simple script that lets users save and reuse form data.
Stars: ✭ 67 (+123.33%)
Mutual labels:  no-dependencies
Entia
Entia is a free, open-source, data-oriented, highly performant, parallelizable and extensible Entity-Component-System (ECS) framework written in C# especially for game development.
Stars: ✭ 28 (-6.67%)
Mutual labels:  no-dependencies
http-node-api
O objetivo dessa aplicação era criar uma API sem nenhuma dependência externa, apenas utilizando as bibliotecas nativas do NodeJS. Tudo foi feito utilizando 100% Javascript.
Stars: ✭ 44 (+46.67%)
Mutual labels:  no-dependencies
flatorize
Generate fast implementations of mathematical expressions. Inclues a linear algebra library.
Stars: ✭ 18 (-40%)
Mutual labels:  mathematical-expressions
ctxmenu
Tiny and customizable context menu generator
Stars: ✭ 20 (-33.33%)
Mutual labels:  no-dependencies
simplehttp
HTTP client for Elixir without dependencies
Stars: ✭ 16 (-46.67%)
Mutual labels:  no-dependencies
units
A lightweight compile-time, header-only, dimensional analysis and unit conversion library built on c++11 with no dependencies
Stars: ✭ 17 (-43.33%)
Mutual labels:  no-dependencies
RussianNounsJS
Склонение существительных по падежам. Обычно требуются только форма в именительном падеже, одушевлённость и род.
Stars: ✭ 29 (-3.33%)
Mutual labels:  no-dependencies
path-dsl-rs
A Rust utility DSL and macro to help construct and modify Paths.
Stars: ✭ 19 (-36.67%)
Mutual labels:  no-dependencies
LaTeX-Templates
Document templates composed using LaTeX for my college assignments and projects (Applicable for any other university or college) ✨
Stars: ✭ 18 (-40%)
Mutual labels:  mathematical-expressions
nim-mathexpr
Tiny math expression evaluator library implemented in pure Nim
Stars: ✭ 58 (+93.33%)
Mutual labels:  mathematical-expressions
growl-alert
A simple growl like notification system.
Stars: ✭ 14 (-53.33%)
Mutual labels:  no-dependencies
value-ptr-lite
value-ptr-lite - A C++ smart-pointer with value semantics for C++98, C++11 and later in a single-file header-only library
Stars: ✭ 38 (+26.67%)
Mutual labels:  no-dependencies
brute-md5
Advanced, Light Weight & Extremely Fast MD5 Cracker/Decoder/Decryptor written in Python 3
Stars: ✭ 16 (-46.67%)
Mutual labels:  no-dependencies
lambda-mailer
Simple module for receiving an email from a contact form on your website.
Stars: ✭ 83 (+176.67%)
Mutual labels:  no-dependencies

Calculate

Version 2.1.1rc10

Download MIT licensed Try online Build Status codecov

Header-only library written in modern C++ aiming for flexibility and ease of use. Calculate is not only a mathematical expressions parser but an engine built on top of the Shunting Yard algorithm.

The main objective of the library is to offer a clean and intuitive interface, where the expressions act and feel like regular functions. Another objective is to be completely configurable; from the underlying data type to the tokenizing logic, the library is in fact a custom parser factory.

auto parser = calculate::Parser{};
auto sum = parser.parse("x+y");

sum(1., 2.);  // returns 3.

Calculate is available as a conan package:

# Append calculate to Conan's repositories list
conan remote add calculate https://api.bintray.com/conan/newlawrence/calculate

Features

  • Generic. double and std::complex<double> parsers included by default.
  • User defined constants, functions, and prefix, suffix and binary operators.
  • Infix and postfix notations supported.
  • Regex-based customizable lexers.
  • Header-only.

Build and test

Calculate doesn't have any third party dependencies, the library should work with any compiler fully compatible with the C++14 standard. Currently it has being tested under gcc (5.2+), clang (3.7+), msvc (19.10+) and intel (18.0+).

The examples and tests need CMake to be built. Conan can be used to handle the dependencies:

# Build the example (Boost libraries needed)
conan install example --install-folder build/example
cmake -H. -Bbuild -DCALCULATE_BUILD_EXAMPLES=ON
cmake --build build --target example

# Build and run the tests (Catch2 library needed)
conan install test --install-folder build/test
cmake -H. -Bbuild -DCALCULATE_BUILD_TESTS=ON
cmake --build build --target make_test  # build
cmake --build build --target test       # run

User guide

Want to try? Check out Calculate's wiki to get started.

License: MIT (see copying).

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].