Skip to content

This library parses and solves math equations from strings. Order of Operations Rules are followed.

License

Notifications You must be signed in to change notification settings

BLM16/Tokenized-Calculator

Repository files navigation

Tokenized Calculator

C# License Nuget

This library parses and solves math equations from strings. Order of Operations Rules are followed.


Note: multiple consecutive exponents are evaluated as (a^b)^c not a^(b^c). Using brackets to explicitly outline order is advised.

Note: constants and functions are evaluated by length of symbol. If pi and p are defined, pi evaluates to pi not p * i. Use operators or parentheses to be explicit about which constants to use.

Note: operators, constants, and functions are case-insensitive (Pi = pI = PI = pi).


Predefined operators, constants, and functions exist for your convenience. Not all of them used by default however. In the calculator's initializer you can add things from DefaultOperators, DefaultConstants, DefaultFunctions, or your own custom values.

License

This code is licensed under the MIT License

About

This library parses and solves math equations from strings. Order of Operations Rules are followed.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages