Your program lets users type a formula such as Area(4, x) + 7, and you have to turn that text into a number without writing your own parser. uCalc Fast Math Parser is built for that job: it evaluates math expressions defined at runtime from your C++, C# or VB code.
Quick facts
- Languages: C++, C#, VB
- Platforms: Windows, Linux, macOS
- Delivery: NuGet package
- Licensing: a free Community tier for hobbyists, students, non-profits, solo developers and small businesses under $100,000 in annual gross revenue, plus paid Commercial licenses
Key features
Parse once, evaluate many times in a loop
You parse an expression a single time, then evaluate it repeatedly with a changing variable. The vendor says this is built for evaluating expressions millions of times per second in a tight loop.
Define your own variables and functions
You can call DefineVariable and DefineFunction at runtime. For example, you can define Area(length, width) = length * width and then use it inside any expression. Custom operators are supported too, alongside the built-in functions.
Simple Eval calls, with string results too
A single call to Eval (or EvalStr for string output) returns the result. That keeps the integration code short.
Plug-and-play NuGet install
The package works on modern .NET Core and legacy .NET Framework. You don't need to place binaries by hand on any platform.
Large set of runnable examples and documentation
The site offers 600+ interactive examples you can run in the browser, plus a documentation reference.
Who it's for
It suits developers who need to evaluate formulas that users or config files supply at runtime. Typical cases are calculators, spreadsheets-style fields and engineering tools. It also suits anyone who wants user-defined functions without building a parser from scratch.
Pros and cons
Pros
- Parse-once, evaluate-many design for repeated calculations
- Works across Windows, Linux and macOS
- Free Community tier for small users
- Many live examples to learn from
Cons
- It is a developer SDK, so you need to write code to use it
- The vendor currently ships a preview version, with an optimized stable release still to come
- It is delivered through NuGet, which suits .NET workflows best
- Larger companies need a paid Commercial license, sold as a yearly subscription or a one-time payment
FAQs
Which languages can I use it from?
You can use it from C++, C# and VB.
Can I use it for free?
Yes, if you are a hobbyist, student, non-profit, solo developer or small business under $100,000 in annual gross revenue. The Community tier covers you. Larger organizations need a Commercial license.
Does it only handle math?
No. It evaluates math expressions, and you can also get string results with EvalStr.
Do I keep the software if I stop paying?
With the yearly Commercial license you keep permanent access to the last version released during your active subscription.
System requirements
It runs on Windows, Linux and macOS and works with modern .NET Core and legacy .NET Framework.