ncalc / ncalc

Mathematical Expressions Evaluator for .NET
https://ncalc.github.io/ncalc/
MIT License
520 stars 74 forks source link

Please support BigInteger operations #264

Open xcaptain opened 2 weeks ago

xcaptain commented 2 weeks ago

For example: 99999999999999999999999999*888888888888888888888888888888888888888

is a simple expression but will throw an Exception when eval it.

Bykiev commented 2 weeks ago

BigInteger will be supported by Parlot parser in the upcoming release, then we can implement it's support in NCalc

xcaptain commented 2 weeks ago

Thanks, related to This PR right? I saw BigInteger in tests.

Bykiev commented 2 weeks ago

Yes. you're right

xcaptain commented 2 weeks ago

image

I tried the new Parlot version in my local dev env, the BigInteger worked, hope to see a new version soon. Also I think as a math calculator, it's no need to handle overflow, because integer space is infinite, convert to BigInteger is more useful.

Bykiev commented 2 weeks ago

The integer overflow can be useful in some cases. BigInteger support can be added via ExpressionOptions without any breaking changes.