Releases: ECP-Solutions/VBA-Expressions
Releases · ECP-Solutions/VBA-Expressions
VBA-Expressions v3.1.2
Cleaning the house!
Improvements
- Better handling of function errors.
VBA-Expressions v3.1.1
Members changes
-
VBAexpressions.cls
: renamedForceBoolean--> EnforceBoolean
property
VBA-Expressions v3.1.0
A little bit more!
Improvements
- Added
SUM
function to aggregate the elements of a list. - Added
GET
function to assign/retrieve variable values from expression arguments. Below is an example of detailed usage:
''' <summary>
''' Variable assignments through parameters
''' </summary>
Private Sub GETfunctionExample()
Dim expr As VBAexpressions
Set expr = New VBAexpressions
With expr
.Create "GET('A';{{2;1;3};{3;-2;-1}}); GET('B';{{2;3};{1;-5};{-2;4}})": .Eval
.Create "GET('C';MMULT(A;B))", False: .Eval 'Creates new expression without clean saved variables values
.Create "ROUND(SUM(SIN(C[0;0]);SIN(C[1;1]));4)", False: .Eval
Debug.Print "Sum sines of diagonal elements on matrix C: "; vbCr; .expression; "| Result: "; .result; " for: "; .CurrentVarValues
Debug.Print "///////////////*****************////////////////////********************//////////////////*********************////////"
End With
Set expr = Nothing
End Sub
''' <OUTPUT>
''' Sum sines of diagonal elements on matrix C:
''' ROUND(SUM(SIN(C[0;0]);SIN(C[1;1]));4)| Result: -0.1912 for: A = {{2;1;3};{3;-2;-1}}; B = {{2;3};{1;-5};{-2;4}}; C = {{-1;13};{6;15}}
''' ///////////////*****************////////////////////********************//////////////////*********************////////
''' </OUTPUT>
- Added
VarValue2
property. This property needs to be used to work with arrays variables assignments. - Added an option to the
Create
method to allow users to create expressions without resetting variables. - Library can already access elements within matrices. For example, the expression
ROUND(SUM(SIN(A[0;0]);SIN(A[1;1]));4)
, with the matrixA={{-1;13};{6;15}}
as a variable, performs the sum of sines for the diagonal elements ofA
with four digits precision, giving-0.1912
as result. - Changed output behaviour of the equation solver and regression calculator. Results are now returned in a column vector.
- Refactored
MMULT
function. - Formated procedures headers.
Bug fixes
- Row vectors were passed as a reference when column vectors were expected in functions involving matrix multiplications, such as the equation system solver and regression computation functions.
VBA-Expressions v3.0.1
One step higher!
Improvements
- Added
MLR
function for multiple linear regression over models with k regressors/predictors variables. The function supports two-way predictors interactions and named predictors. - Added
CHOLESKY
function for decomposition of positive definite nxn matrices. - Added
CHOLSOLVE
function for solving systems of linear equations by Cholesky decomposition. - Added
CHOLINVERSE
function for computing inverse of matrices using the Cholesky decomposition. - Added more unit tests.
- Removed unused code
- Improved
ToDblArray
method. - Improved
FIT
function. Internally it now works with multiple linear regressions for polynomial fitting. - Improved
MSUM
function.
Bug fixes
- Fixed bug preventing
MMULT
function from evaluating correctly when multiplying a 2D by 1D matrix. - Fixed bug causing an anomalous splitting within the lists expressed as a literal string.
This release use ideas from:
(c) Douglas C. Montgomery and George C. Runger [Applied Statistics and Probability for Engineers]
(c) William H. Press [Numerical recipes in C: the art of scientific computing]
VBA-Expressions v3.0.0
The most robust expressions evaluation tool for VBA is here now!
Improvements
- Added
ROUND
function - Added
MROUND
function for matrices elements round - Added
REM
function to compute division operation remainder - Added
MSum
function for matrices adittion and substraction - Added
MTranspose
function for computing matrix transposition - Added
MNEG
function for computing matrix negation - Added
GAMMALN
function - Added
iBETA
function for computing the integral of BETA function - Added
BETAINV
function - Added
TINV_1T
function for compute the one-tailed t-value (Student t-value) with up to 6 significant digits accuracy. - Added
TINV
function to compute the one-tailed or two-tailed t-value (Student t-value) with up to 6 significant digits accuracy. Use the tOption parameter to select from two and right one-tailed computation. - Added
TINV_2T
function compute the two-tailed t-value (Student t-value) with full significant digits accuracy. - Added
NORM
function - Added
CHISQ
function - Added
GAUSS
function - Added
ERF
function - Added
STUDT
function - Added
ANORM
function - Added
AGAUSS
function - Added
AERF
function - Added
ACHISQ
function - Added
FISHF
function - Added
ASTUDT
function - Added
AFISHF
function - Added
ArrayFromString2
method for create jagged arrays from Strings - Added
QR
function for computing QR decomposition using Householder transformations. - Added
LSQRsolve
function for solve overdetermined system of equations using the least square method and the QR decomposition. - Added
FIT
function to perform least squares regression curve fitting with goodness of fit computation. The function supports straight-line, polynomial, exponentiation, power and logarithmic fits. - New
GAMMA
function implementation - More flexible variable scope: now allows vectors and arrays assignment from eval method directly. It is allowed to assign the value of a variable not present in the main expression but which is a second order variable present in the ImplicitVarValue arguments.
- More unit test added
- Aded support for matrices by scalar multiplication
- Improved string Array constructors and array parser
- Factorial function now accepts non integers parameters thanks to the new GAMMA function implementation
- Improved error messages for functions eval errors
Bug fixes
- Fixed bug preventing expressions from being parsed correctly at tokenisation stage.
- Fixed indexes base different from 0 for arrays.
Note
This software use ideas/creations from:
© John C. Pezzullo
© David M. Lane
© Dr. Hossein Arsham
© iCalculator™
© mozilla.org
© William H. Press [Numerical recipes in C: the art of scientific computing / William H. Press]
VBA-Expressions v2.0.2
- Fixed error: work with consecutive parentheses was broken.
- Added test for implied multiplication.
VBA-Expressions v2.0.1
This release add support for implicit multiplication, using parentheses, and for piecewise function evaluation.
VBA-Expressions v2.0.0
This new version includes many useful features, now VBA Expressions is shaping up to be a much more powerful tool.
Improvements
- VBA string, date-time and logical functions have been added (totaling more than 60 built-in functions).
- The evaluator now allows to define the value of a variable in terms of previously defined variables through the
ImplicitVarValue
property. - Improved array handling mechanism.
- Added
Solve
andfZero
functions. - Refactoring: added
VBAexpressionsScope
class. - Bug fixed: boolean negation prevents recognizing variables. Affected methods: Eval.
VBA-Expressions v1.0.1
Improvements:
- More advanced string manipulation behavior. It is now possible to evaluate string expressions as
concat(concat('String1';'String2';'|');'String3';'+')
. Note thatConcat
is a UDF function included to test the capabilities of our expression evaluator. - The user can test the expression evaluator via a user form launched via a button from the Excel ribbon. This allows playing with the utility without the need to run Rubberduck unit tests.
VBA-Expressions v0.0.9
Bugs fixed:
- The system could not check for empty strings. Now users can check if a value is
vbNullString
using an expression likeDate = ''
.