Table of Contents

5.6.0

Breaking Changes

5.5.0

Breaking Changes

  • The number with fractional part with scientific notation without specifying fractional part is not valid anymore (123.E2 is not a valid expression anymore, should be 123.0E2)

5.4.1

5.4.0

Breaking Changes

  • Removed IEvaluationService, please use IEvaluationVisitorFactory. Check this article for more info.

5.3.1

5.3.0

Breaking Changes

5.2.11

5.2.10

5.2.9

5.2.8

5.2.7

5.2.6

5.2.5

5.2.4

5.2.3

5.2.2

5.2.1

5.2.0

5.1.0

5.0.0

Breaking Changes

  • NCalcAsync now uses AsyncExpressionContext
  • ExpressionContext is now a record instead of a class, allowing support for shallow cloning
  • IEvaluationVisitor is removed, please use IEvaluationService for an easier to implement interface
  • ILogicalExpressionVisitor is now ILogicalExpressionVisitor<T>, where <T> is the return of the visitor
  • IAsyncLogicalExpressionVisitor is removed, please use ILogicalExpressionVisitor<Task<object?>>
  • AdvancedExpression and AsyncAdvancedExpression are removed, please use the respective constructors at Expression and AsyncExpression to prevent unnecessary casting.

4.3.3

4.3.2

4.3.1

4.3.0

Breaking Changes

  • Expression is now AsyncExpression at NCalcAsync, related classes are also prefixed with Async to prevent naming collisions
  • Removed obsolete HasOption extension method from ExpressionOptions, please use HasFlag
  • Removed obsolete CaseInsensitiveComparer enum member, please use CaseInsensitiveStringComparer

4.2.1

4.2

Breaking Changes

4.1

4.0

Breaking Changes

  • .NET Framework 4.6.1 no longer supported, please update to .NET Framework 4.6.2 or higher
  • Renamed EvaluateOptions enum to ExpressionOptions
  • Renamed EvaluateOptionsExtensions class to ExpressionOptionsExtensions
  • Renamed Expression.OriginalExpression property to Expression.ExpressionString
  • Renamed Expression.ParsedExpression property to Expression.LogicalExpression
  • Renamed Numbers static class to MathHelper
  • Removed Expression.Compile static method, please use LogicalExpressionFactory.Create
  • Removed unused BinaryExpressionType.Unknown enum value
  • Expression.Error property now stores an Exception object instead of a string
  • Expression.GetParametersNames method now returns a List<String> instead of a string[]

3.13.1

3.13

3.12

3.11

3.10

3.9

3.8

3.7

3.6

3.5

3.4

3.2

3.1

3.0

Several syntax changes to the grammar:

While these changes in themselves wouldn't introduce compatibility issues with previously valid statements, code that relies on statements with these constructs being invalid would be affected. The grammar also had to be regenerated with a new version of ANTLR with some fixes to it since it was clear that the generated source code had been modified manually. Manual review indicates that the regenerated grammar is identical, but because of both these reasons this is released as a new major version.

  • Bugfix: invalid tokens were skipped silently without any errors. Expressions like "4711" would ignore the " (since that is not the string character in the NCalc syntax) and parse it as the number 4711, but now an EvaluationException is thrown as for other syntax issues. This may affect existing expressions, but since they were always incorrect and now give an exception rather than silently getting a new value it does not merit a new major release.
  • Major bugfix: long integers are now treated as integers. Previous versions converted them to single-precision floats, which caused data loss on large numbers. Since this affects the results of existing expressions, it requires a new major release.
  • New builtin function Ln()

2.0

Initial public release of the .NET Core version.