Thx for quick response, I went with the decimal, and that worked.
How ever, I have some questions regarding performance of this library.
My code from the posting above has been used in a foreach-loop (testing with about 300000 items) evaluating formulas and x-values retrieved from linq to sql.
My first "problem" was that it was really slow when in debug-mode (VS 2010). The loop took over 3 minutes to complete, and took a lot of memory. If I run the same from a released .exe-file, it took 13 seconds to complete. That seems like a really
big difference between debug and release? Any pointers to that?
My second issue is also regarding performance. I am also checking out the Dynamic Formula library (http://www.codeproject.com/Articles/25578/Dynamic-Formula-Processing-Library?msg=4509783#xx4509783xx
. Comparing these two solutions over the same data as above, NCalc takes 13 seconds and DynamicFormula takes only 7 seconds to complete.
Could it be that I use your solution in a less efficient way than I could have?
(I would like to use NCalc since it has more possibilities, but performance is very important for me).
Thanks for any insights you may have on these topics.