GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - oglimmer/math_parser_cpp: A mathematical function parser in C++

BranchesTags
Open more actions menu

Latest commit

 

History

20 Commits
20 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
src
src
 
 
test
test
 
 
.DS_Store
.DS_Store
 
 
.gitignore
.gitignore
 
 
CMakeLists.txt
CMakeLists.txt
 
 
Dockerfile
Dockerfile
 
 
README.md
README.md
 
 
conanfile.txt
conanfile.txt
 
 
entrypoint.sh
entrypoint.sh
 
 

Repository files navigation

A mathematical function parser for C++

Supported syntax

It can debugResolve + - * / ^ ( ) as in 53 * 34 or (2+3)*4^2

It can debugResolve sqrt log logten sin cos tan asin acos atan as in sqrt(9) or cos(343) (log is log to base of 2, and logten is log to the base of 10)

It can debugResolve pi e to return the constants pi and e.

Finally, it can debugResolve any variable name matching ^\w+$.

How to use it

via Docker

Build it

docker build --tag mathparser .

Run it

docker run --rm mathparser "((2+3)*-3)+2+x*y*sin(pi/2)" "x" "-34" "y" "3"

local compile

You need to have a C++20 compatible compiler, cmake > 3.13 and conan installed.

Then run this to build, test and install:

mkdir build && cd build
conan install ..
cmake ..
cmake --build .
ctest
sudo cmake --install . 

Run via:

math_parser-bin "((2+3)*-3)+2+x*y*sin(pi/2)" "x" "-34" "y" "3"

(First parameter is the function, any 2nd and 3rd is a variable and its value)

About

A mathematical function parser in C++

math.oglimmer.de

Topics

cppcpp20function-parsermath

Resources

Readme
Activity

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.