Coder Social home page Coder Social logo

dandarawy / functionparser Goto Github PK

View Code? Open in Web Editor NEW
14.0 14.0 5.0 2.35 MB

A C# library to parse and evaluate any mathematical expression

License: MIT License

C# 100.00%
expression expression-evaluator expression-parser function-plotter math parser

functionparser's People

Contributors

dandarawy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

functionparser's Issues

[Question] Custom/User Function

Hi, just wondering is there a way to add custom/user functions?
Seems it should be able to since the pattern is well defined but according to README it doesn't look so.

Thanks!

Order of exponentiation operation

Source: https://ru.frwiki.wiki/wiki/Ordre_des_op%C3%A9rations
In mathematics, the order of operations or order of operations determines the order in which calculations are to be performed in a complex expression.

Priority rules:
1) calculations in parentheses or square brackets take precedence over calculations outside. The horizontal fraction or root column acts like a parenthesis;
2) exponentiation takes precedence over multiplication, division, addition, and subtraction;
3) multiplication and division take precedence over addition and subtraction;
4) in brackets, multiply and divide from left to right. The same is true for addition and subtraction.

Math Examples:

  1. 3,14*(X/1000/2)^2=0,212(X=520) <--- Incorrect answer = 0,667
  2. (X/1000/2)^2*3,14=0,212(X=520) <--- Correct answer = 0,212
  3. 3,14*(X/1000/2)^(2-2)=3,14(X=520) <--- Incorrect answer = 1
  4. 3,14*(X/1000/2)^(2+2)=0.014 <--- Incorrect answer = 0,444
  5. 3,14*(X/1000/2)^(2^2-2)=0,212(X=520) <--- Incorrect answer = 0,667

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.