xFunc 4.4.0
- The
Helpersclass is removed from the public API (see #698). LambdaExpressiondoesn't capture context onExecutethis code moved toCallExpression(see #704).xFunc.DotnetTool->xFunc.CliWhiledoesn't inheritBinaryExpression, instead it implementsIExpressiondirectly.ResultIsNotSupportedException->ExecutionException. The error message changed.While/Forthrows the correct exception whenConditiondoesn't returnbool(InvalidCastException->ExecutionException).While/ForreturnsEmptyValue.Derivative/If/While/Foris executed in nestedExpressionParametersscope now. It means all variables created in process of expressions evaluation won't affect parent/global scope.- The
Parametersproperty is removed fromDifferentiatorContext. - The return type of
Processor.Solvemethod has change (see #720 - New Results API).
xFunc 4.3.0
MatrixIsInvalidException->InvalidMatrixException.Vector/MatrixreturnsVectorValue/MatrixValueinstead ofVector/Matrix.Del/Simplify/Derivatefunctions accept/return lambdas instead of expression.- The grammar for
CallExpression. Now you can use any expression as the function to call, eg.deriv((x) => x ^ 2)(3)becausederivreturns a lambda, you can call it immediately. Previously, only user function and inline lambda expression were supported. ExpressionResultis removed, partially replaced byLambdaResult.ResultTypes.ExpressionandResultTypes.Lambdaare merged intoResultTypes.Lambda.- DotNet Tool has the
xfuncname in the terminal (all letters are lowercase). NumberValue.NegativeInfinitypoints todouble.NegativeInfinityinstead ofdouble.PositiveInfinity.- The ability to parse the implicit mull operator (eg. 2x) is returned.
xFunc 4.2.0
xFunc.Mathstargets.NET 6instead of.NET Standard 2.1ComplexNumberdoesn't perform the strict comparison of floating point numbers (Real and Imaginary parts).AngleUnitisclassinstead ofenum.Contains/ContainsKey(ParameterCollection) doesn't check the constants collection anymore (see #623).- Removed russian localization (see #625).
UserFunctionwas removed, partially replaced byCallExpressionandLambda(see #628).ParameterCollectionis renamed toExpressionParamaters, and the old version ofExpressionParametersis removed.FunctionCollectionwas removed, nowExpressionParameterscan hold functions as well (see #628).->and=>operators can be used only for lambda expressions, the implication and the equality operators can be used only by keywords:implandeq.Define/Undefinecan accept onlyVariableinstead ofIExpression.- the grammar to define user function was changed from
f(x) := sin(x)tof := (x) => sin(x). Define->Assign,Undefine->Unassign.- The
:=operator andassign/unassignfunctions are parsed as expressions instead of statements (they can be used inside other expressions, for example:1 + (x := 1)/(f := (x) => x)(2) Assign/Unassignreturns the assigned/unassigned value instead ofstring.- The ability to parse the implicit mull operator (eg.
2x) is removed. Now only2 * xis supported.
xFunc 4.1.0
Analyzer<TResult, TContext>is abstract now.- UI moved to the separate repository xFunc.UI.
- The
xFunc.UnitConverterproject was removed (unit conversion migrated to xFunc.Maths).
xFunc 4.0.0
The grammar is changed:
- it is no longer "validated" by lexer/post processing, now it is a part of parsing process.
:=,def,undefoperators are statements now (so, they cannot be used as a parameter of any expression, execpt: 'for', 'while', 'if' or standalone usage).for,whilefunctions are statements now.- the
^operator is right-associative (see #244). vector/matrixprefix is no longer required to create a vector/matrix, like:{1, 2}.- functions should use parentheses (
(,)),{,}is no longer supported.
Lexer:
- The lexer post processing is removed.
- The lexer factories are removed.
Functions,Symbols,Operatorsenums are removed.UserFunctionTokenis removed.- Several operator tokens are moved to keywords.
- Lexer and Tokens are removed from public API (see #311, #312).
- All Tokens are represented by single struct (see #311).
Expressions:
- Expressions are immutable (#331).
- Precedence of operators are changed (#343).
- Changed validation in expression constructors (no nulls, no empty arrays, strict parameter count).
IFunctionExpressionis removed.- Changer order of parameters in
Logconstructor. Inc,Decdo not inheritUnaryExpression. TheArgumentproperty is renamed toVariable(typeVariable).AddAssign,SubAssign,MulAssign,DivAssigndo not inheritBinaryExpression. TheLeftproperty is renamed toVariable(typeVariable).UnaryExpression.Argument,BinaryExpression.Left/Rightare no longer virtual.DifferentParametersExpression.Arguments,Matrix.VectorsreturnIEnumerable<IExpression>instead of array and it is only getter now.Matrix,Vector,DifferentParametersExpressiondo not allownullarguments.Matrix,UserFunctiondo not inheritDifferentParametersExpression.Matrix.CreateIdentity,Matrix.this[int row, int col]are removed.Matrix.ParametersCount->Rows.Matrix.SizeOfVectors->Columns.And/Or(fromxFunc.Maths.Expressions.Programmingnamespace) ->ConditionalAnd/ConditionalOr.- Logical/Bitwise operators do not support floating point numbers (throw
ArgumentExceptionexception). - The
Parentproperty is removed fromIExpression(see #275). - Inverse trigonometric/hyperbolic expression return radians, use conversion functions (
todegree, etc) to get other units (see #268).
Other:
- The expression factory is removed (moved to parser as internal part).
- Removed support for
.NET Framework.xFunc.Maths/xFunc.UnitConvertersis .NET Standard 2.1. - Removed Ukranian localization.
- xFunc UI moved to .NET Core 3.1.
CLSCompliantis removed.GetHashCodeimplementations are removed.MathExtensions,ComplexExtensions,MatrixExtensionsare removed from public API.VariableandParametersproperties are moved fromDifferentiatortoDifferentiatorContext(see #277).- The constructor of
Boolis private, use static fieldsTrue/False. AngleMeasurementmoved toExpression.Anglesnamespace (see #268).- The
AngleMeasurementproperty is removed fromExpressionParameters, this feature is replaced by number units, which you can specify alongside a number, like90 degree(see #268). NumeralSystem.Hexidecimal->NumeralSystem.Hexadecimal.NumeralSystemis removed (see #302).- It is not allowed to assign an
objecttoParameter(it is removed from public API).
xFunc 3.7.0
- All internal constructors of expression was removed (see #216).
ExpressionFactorywas reworked (see #216).LexerException->TokenizeException(see #216).ParserException->ParseException(see #216).- The
DoSimplifyproperty was removed (see #220). - The setter for
Typeproperty ofParameterwas removed. Parametercannot containnullvalue (see #222).- The value of
Parameter(Constant or ReadOnly) cannot be changed (see #222). - Max/MinParameters are removed (see #223).
FunctionToken.CountOfParams->FunctionToken.CountOfParameters
xFunc 3.6.0
MinParameters,MaxParameters,ParametersCountmoved fromIExpressiontoIFunctionExpression(see #211).
xFunc 3.5.0
- Changed exceptions, which are thrown by Expressions and Type Analyzer (see #190).
- Removed ReverseFunctionAttribute (see #195).
- Variables and user functions are case sensitive (see #197).
xFunc 3.2.1
- Removed
Processor.Parse(string, bool)method (see #170). Add new property to control simplification of expression:bool Processor.DoSimplify.