All Projects → bugwheels94 → Math Expression Evaluator

bugwheels94 / Math Expression Evaluator

Licence: mit
Math JS library. Super advanced & efficient Math expression evaluator

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Math Expression Evaluator

Igraph
Library for the analysis of networks
Stars: ✭ 1,145 (+1022.55%)
Mutual labels:  mathematics
Csmath 2020
This mathematics course is taught for the first year Ph.D. students of computer science and related areas @ZJU
Stars: ✭ 85 (-16.67%)
Mutual labels:  mathematics
D3graphtheory
💥 Interactive and colorful 🎨 graph theory tutorials made using d3.js ⚡️
Stars: ✭ 1,364 (+1237.25%)
Mutual labels:  mathematics
Mathworldvr
Math world in WebVR, powered by A-frame.
Stars: ✭ 73 (-28.43%)
Mutual labels:  mathematics
C
Collection of various algorithms in mathematics, machine learning, computer science, physics, etc implemented in C for educational purposes.
Stars: ✭ 11,897 (+11563.73%)
Mutual labels:  mathematics
Octsympy
A Symbolic Package for Octave using SymPy
Stars: ✭ 92 (-9.8%)
Mutual labels:  mathematics
Korma
Mathematics library focused on geometry for Multiplatform Kotlin 1.3
Stars: ✭ 65 (-36.27%)
Mutual labels:  mathematics
Project Euler Solutions
Runnable code for solving Project Euler problems in Java, Python, Mathematica, Haskell.
Stars: ✭ 1,374 (+1247.06%)
Mutual labels:  mathematics
Notebooks
📓 A growing collection of Jupyter Notebooks written in Python, OCaml and Julia for science examples, algorithms, visualizations etc
Stars: ✭ 84 (-17.65%)
Mutual labels:  mathematics
Researchpapernotes
Initiative to read research papers
Stars: ✭ 97 (-4.9%)
Mutual labels:  mathematics
Orthopy
Orthogonal polynomials in all shapes and sizes.
Stars: ✭ 75 (-26.47%)
Mutual labels:  mathematics
Fractional Differentiation Time Series
As described in Advances of Machine Learning by Marcos Prado.
Stars: ✭ 78 (-23.53%)
Mutual labels:  mathematics
Computer Science Resources
A list of resources in different fields of Computer Science (multiple languages)
Stars: ✭ 1,316 (+1190.2%)
Mutual labels:  mathematics
Math Toolbox
Lightweight and modular math toolbox
Stars: ✭ 71 (-30.39%)
Mutual labels:  mathematics
Algorithms
A collection of algorithms and data structures
Stars: ✭ 11,553 (+11226.47%)
Mutual labels:  mathematics
Programming Exercises
Programming Exercises about Interesting Topics
Stars: ✭ 67 (-34.31%)
Mutual labels:  mathematics
Coordinateaxischart
Drawing graphs of point, linear function, power function, exponential function, logarithmic function, circular function, etc in a coordinate. (实现了在坐标系中画点,一次函数,幂函数,指数函数,对数函数,三角函数等)
Stars: ✭ 90 (-11.76%)
Mutual labels:  mathematics
Root
The official repository for ROOT: analyzing, storing and visualizing big data, scientifically
Stars: ✭ 1,377 (+1250%)
Mutual labels:  mathematics
Javascript
A repository for All algorithms implemented in Javascript (for educational purposes only)
Stars: ✭ 16,117 (+15700.98%)
Mutual labels:  mathematics
Funmath
☔️ Implementations of mathematical functions, formulas and concepts
Stars: ✭ 93 (-8.82%)
Mutual labels:  mathematics

math-expression-evaluator

An extremely efficient, flexible and amazing evaluator for Math expression in Javascript.(Documentation)

Use cases

Input Result Explanation
2+3-1 4 Addition and Subtraction operator
2*5/10 1 Multiplication and Division operator
tan45 or tan(45) 1 Trigonometric Function ( tan in Degree mode)
tan45 or tan(45) 1.619775190543862 Trigonometric Function ( tan in Radian mode)
Pi1,15,n or Pi(1,15,n) 1307674368000 Product of Sequence
Sigma1,15,n or Sigma(1,15,n) 120 Sum of Sequence( also called summation)
2^3 8 Exponent( note this operator is left associative like MS Office)
5P3 60 Permutaion Method to calculate all the permutaions
sincostan90 or sin(cos(tan(90))) 0.017261434031253 Multiple functions with or without parenthesis (both works)

Fiddle Yourself

Installation

Node JS

Using npm

npm install math-expression-evaluator

Browser

Using bower

bower install math-expression-evaluator

How to run test

npm test

Supported symbols

Symbol Explanation
+ Addition Operator eg. 2+3 results 5
- Subtraction Operator eg. 2-3 results -1
/ Division operator eg 3/2 results 1.5
* Multiplication Operator eg. 2*3 results 6
Mod Modulus Operator eg. 3 Mod 2 results 1
( Opening Parenthesis
) Closing Parenthesis
Sigma Summation eg. Sigma(1,100,n) results 5050
Pi Product eg. Pi(1,10,n) results 3628800
n Variable for Summation or Product
pi Math constant pi returns 3.14
e Math constant e returns 2.71
C Combination operator eg. 4C2 returns 6
P Permutation operator eg. 4P2 returns 12
! factorial operator eg. 4! returns 24
log logarithmic function with base 10 eg. log 1000 returns 3
ln natural log function with base e eg. ln 2 returns .3010
pow power function with two operator pow(2,3) returns 8
^ power operator eg. 2^3 returns 8
root underroot function root 4 returns 2
sin Sine function
cos Cosine function
tan Tangent function
asin Inverse Sine function
acos Inverse Cosine function
atan Inverse Tangent function
sinh Hyperbolic Sine function
cosh Hyperbolic Cosine function
tanh Hyperbolic Tangent function
asinh Inverse Hyperbolic Sine function
acosh Inverse Hyperbolic Cosine function
atanh Inverse Hyperbolic Tangent function

Features

Amazing support for Sigma and Pi

This is a fantastic feature of this calculator that it is capable of evaluating expressions containing Sigma and Pi. Passing Sigma(1,100,n) will evaluate to 5050 as n is summationed from 1 to 100. and Pi(1,15,n) will evaluate to 1307674368000 as n is multiplied from 1 to 15 which is equal to 15!

Parenthesis less expression

If a expression is readable by human then it is readable by this evaluator. There is no need to wrap every function inside parenthesis. For eg. sin90 will work totally fine instead of sin(90)

##Changelog

Removed lodash.indexof and used native Array.prototype.indexOf hence dropping suppports for IE8 and below.

This will reflect in next release named v1.2.16

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