Answer the question
In order to leave comments, you need to log in
How to calculate using formulas?
I have a textbox where the formula is entered, but how to make the calculation take place in it, I don’t know how this can be done ??
Answer the question
In order to leave comments, you need to log in
You can use ready-made libraries.
For example, MathNet.Symbolics
The library is written in F#, but you can also use it in a C# project:
Math-NET-Symbolics-with-C-VB-NET-and-C-CLI
As you can see from the example:
using MathNet.Symbolics;
using Expr = MathNet.Symbolics.SymbolicExpression;
...
Expr.Parse("1/(a*b"); // выбросит исключение
Expr.Parse("1/(a*b)").ToString(); // вернет строку "1/(a*b)"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question