mathnet-symbolics icon indicating copy to clipboard operation
mathnet-symbolics copied to clipboard

How to extend with a custom function in c#?

Open omnilogix opened this issue 4 months ago • 0 comments

I would like to add a ccustom function that gets evaluated when calling SymbolicExpression.Evaluate();

for instance SqFt(x, y) where I would calculate square footage from the parameters

public double SqFt(double x, double y) { return x * y; }

SymbolicExpression.Parse("SqFt(23, 15)");

When using NCalc I was able to attach a delegate that would receive the function name and arguments so I could return a result.

Is there a way to do this with MathNet?

Thanks

omnilogix avatar Oct 17 '24 00:10 omnilogix