asc-community / AngouriMath

New open-source cross-platform symbolic algebra library for C# and F#. Can be used for both production and research purposes.
https://am.angouri.org
MIT License
784 stars 75 forks source link

pow function is not parsing correctly #625

Open NK01 opened 10 months ago

NK01 commented 10 months ago

The version I use: AngouriMath

Unexpected behaviour or bug: When using Entity expr = "pow(2,3)" it gives an UnhandledParseException: AngouriMath.Core.Exceptions.UnhandledParseException: 'line 1:11 no viable alternative at input '*(2'' this is not limited to this particular input, but generalizes to any input in pow function When using Entity expr = "pow(a,b)" it gives an UnhandledParseException: AngouriMath.Core.Exceptions.UnhandledParseException: 'line 1:11 no viable alternative at input '*(a''

WhiteBlackGoose commented 10 months ago

Use ^ for power

NK01 commented 10 months ago

I am using ^ for the time being and replacing all the Pow() instances from the user Input. I have also tested all the other functions, but they were working fine without issue