xFunc 4.4.0
- The
Helpers
class is removed from the public API (see #698). LambdaExpression
doesn't capture context onExecute
this code moved toCallExpression
(see #704).xFunc.DotnetTool
->xFunc.Cli
While
doesn't inheritBinaryExpression
, instead it implementsIExpression
directly.ResultIsNotSupportedException
->ExecutionException
. The error message changed.While
/For
throws the correct exception whenCondition
doesn't returnbool
(InvalidCastException
->ExecutionException
).While
/For
returnsEmptyValue
.Derivative
/If
/While
/For
is executed in nestedExpressionParameters
scope now. It means all variables created in process of expressions evaluation won't affect parent/global scope.- The
Parameters
property is removed fromDifferentiatorContext
. - The return type of
Processor.Solve
method has change (see #720 - New Results API).
xFunc 4.3.0
MatrixIsInvalidException
->InvalidMatrixException
.Vector
/Matrix
returnsVectorValue
/MatrixValue
instead ofVector
/Matrix
.Del
/Simplify
/Derivate
functions 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)
becausederiv
returns a lambda, you can call it immediately. Previously, only user function and inline lambda expression were supported. ExpressionResult
is removed, partially replaced byLambdaResult
.ResultTypes.Expression
andResultTypes.Lambda
are merged intoResultTypes.Lambda
.- DotNet Tool has the
xfunc
name in the terminal (all letters are lowercase). NumberValue.NegativeInfinity
points todouble.NegativeInfinity
instead ofdouble.PositiveInfinity
.- The ability to parse the implicit mull operator (eg. 2x) is returned.
xFunc 4.2.0
xFunc.Maths
targets.NET 6
instead of.NET Standard 2.1
ComplexNumber
doesn't perform the strict comparison of floating point numbers (Real and Imaginary parts).AngleUnit
isclass
instead ofenum
.Contains
/ContainsKey
(ParameterCollection
) doesn't check the constants collection anymore (see #623).- Removed russian localization (see #625).
UserFunction
was removed, partially replaced byCallExpression
andLambda
(see #628).ParameterCollection
is renamed toExpressionParamaters
, and the old version ofExpressionParameters
is removed.FunctionCollection
was removed, nowExpressionParameters
can 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:impl
andeq
.Define
/Undefine
can accept onlyVariable
instead 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
/unassign
functions are parsed as expressions instead of statements (they can be used inside other expressions, for example:1 + (x := 1)
/(f := (x) => x)(2)
Assign
/Unassign
returns the assigned/unassigned value instead ofstring
.- The ability to parse the implicit mull operator (eg.
2x
) is removed. Now only2 * x
is supported.
xFunc 4.1.0
Analyzer<TResult, TContext>
is abstract now.- UI moved to the separate repository xFunc.UI.
- The
xFunc.UnitConverter
project 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
,undef
operators are statements now (so, they cannot be used as a parameter of any expression, execpt: 'for', 'while', 'if' or standalone usage).for
,while
functions are statements now.- the
^
operator is right-associative (see #244). vector
/matrix
prefix 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
,Operators
enums are removed.UserFunctionToken
is 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).
IFunctionExpression
is removed.- Changer order of parameters in
Log
constructor. Inc
,Dec
do not inheritUnaryExpression
. TheArgument
property is renamed toVariable
(typeVariable
).AddAssign
,SubAssign
,MulAssign
,DivAssign
do not inheritBinaryExpression
. TheLeft
property is renamed toVariable
(typeVariable
).UnaryExpression.Argument
,BinaryExpression.Left/Right
are no longer virtual.DifferentParametersExpression.Arguments
,Matrix.Vectors
returnIEnumerable<IExpression>
instead of array and it is only getter now.Matrix
,Vector
,DifferentParametersExpression
do not allownull
arguments.Matrix
,UserFunction
do not inheritDifferentParametersExpression
.Matrix.CreateIdentity
,Matrix.this[int row, int col]
are removed.Matrix.ParametersCount
->Rows
.Matrix.SizeOfVectors
->Columns
.And
/Or
(fromxFunc.Maths.Expressions.Programming
namespace) ->ConditionalAnd
/ConditionalOr
.- Logical/Bitwise operators do not support floating point numbers (throw
ArgumentException
exception). - The
Parent
property 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.UnitConverters
is .NET Standard 2.1. - Removed Ukranian localization.
- xFunc UI moved to .NET Core 3.1.
CLSCompliant
is removed.GetHashCode
implementations are removed.MathExtensions
,ComplexExtensions
,MatrixExtensions
are removed from public API.Variable
andParameters
properties are moved fromDifferentiator
toDifferentiatorContext
(see #277).- The constructor of
Bool
is private, use static fieldsTrue
/False
. AngleMeasurement
moved toExpression.Angles
namespace (see #268).- The
AngleMeasurement
property 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
.NumeralSystem
is removed (see #302).- It is not allowed to assign an
object
toParameter
(it is removed from public API).
xFunc 3.7.0
- All internal constructors of expression was removed (see #216).
ExpressionFactory
was reworked (see #216).LexerException
->TokenizeException
(see #216).ParserException
->ParseException
(see #216).- The
DoSimplify
property was removed (see #220). - The setter for
Type
property ofParameter
was removed. Parameter
cannot containnull
value (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
,ParametersCount
moved fromIExpression
toIFunctionExpression
(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
.