最佳免费的C#数学分析器使用变量,用户自定义函数,运营商定制分析器、自定义、变量、运营商

2023-09-03 00:42:04 作者:醉酒成梦

我在寻找一个.NET数学分析器,它使用的变量,运营商定制和用户定义的函数... 由于今天我用muParser(有一个包裹版本.NET),但我发现它太慢了!

I'm looking for a .NET Math Parser which uses variables, custom operators and user defined functions... Since today i've used muParser (there's a wrapped version for .NET), but i noticed it is too slow!

有谁知道另一种数学分析器(免费!)的作品pretty的好?

Does anybody knows another Math Parser (FREE!) that works pretty good?

我试图NCalc,但它不具有变量,所以它失败..

I tried NCalc, but it doesn't have variables, so it fails..

推荐答案

我发现这三个截至今日,所有这些都支持变量和用户定义的函数,但是的只有muParser似乎支持运营商定制:

I've found these three as of today, all of which support variables and user defined functions, but only muParser seems to support custom operators:

NCalc 数学分析器.NET muParser - 有一个.NET包装 和谷歌知道更多... NCalc Math Parser .NET muParser - has a .NET wrapper and Google knows even more...

有关我的小玩具项目,我就跟着数学分析器.NET ,因为它支持 ^ 的权力,而NCalc不和muParser有点不吸引我一样多。还有另外一个好处:数学分析器.NET支持本地C#委托定制的功能! ,其他图书馆提供的解决方案别看优雅。

For my little toy project I went with Math Parser .NET since it supports ^ for powers whereas NCalc does not, and muParser somehow didn't appeal to me as much. There is another benefit: Math Parser .NET supports native C# delegates as custom functions! The solutions that the other libraries offer don't look that elegant.