Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

A very basic math expressions(infix) evaluator

License

NotificationsYou must be signed in to change notification settings

b37t1td/libcalc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A very basic math expressions(infix) evaluator

Build Status

This library built using basicRPN algorithm and intended to evaluateinfix math expressions.In simple words it evaluates expressions like this:

( 5 - 3 ) * 2

into

4

Installation

  git clone git@github.com:b37t1td/libcalc.git  cd libcalc  take build  cmake ..  cpack  sudo dpkg -i libcalc_*.deb

Usage

Example oftest.cxx

#include<iostream>#include<libcalc.hpp>intmain() {  std::cout <<libcalc::eval("2 * ( 5 - 3 )") << std::endl;}

Which we build with:

g++ -std=c++11 -Wall test.cxx `pkg-config --libs --cflags libcalc`

So, run it./a.out and you will see4.

License

MIT

About

A very basic math expressions(infix) evaluator

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp