- Implied Multiplication: #243
- Unicode Math Symbols: #249
- Student’s t-distribution: #256
- Chi-Squared Distribution: #257
- An Attempt To Fix Expression String: #254
- Minor Bug fixing
- Regression tests refactoring: #247
Category Archives: Release notes
Port to various .NET frameworks
MathParser.org-mXparser is now available for various .NET frameworks
- .NET Framework: 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2
- .NET Core: 1.0, 1.1
- .NET Standard: 1.0, 1.6
- .NET PCL: portable45-net45+win8+wpa81
- Xamarin.Andoird: 1.0, 6.0
- Xamarin.iOS: 1.0
Enjoy 🙂
Best regards,
Mariusz Gromada
MathParser.org-mXparser on Maven Central
mXparser – v.5.0 – released! Major update!
TO SUPPORT MY WORK, ORDER A COMMERCIAL LICENSE
THANK YOU!
v.5.0.4 (2022-05-22): Leonis – a major release: Implied Multiplication, Unicode Math Symbols, Additional Probability Distributions, Calculation Steps Register:
- Implied Multiplication, click to see usage example
- Unicode Math Symbols, click to see usage example
- Calculation Steps Register, click to see usage example
- An Attempt To Fix Expression String
- Student’s t-distribution: Probabilisty Density Function, Cumulative Distribution Function, Quantile Function
- Chi-Squared Distribution: Probabilisty Density Function, Cumulative Distribution Function, Quantile Function
- Minor Bug fixing: 259, 258, 252
- Regression tests refactoring
- License update
v.4.4.2 (2020-01-25): Gemoni – bugs fixing
- #200 System.OutOfMemoryException: Array dimensions exceeded supported range (#200)
- #199 cancelCurrentCalculation does not stop for some expressions (#199)
v.4.4.0 (2020-01-14): Gemoni – API improvement
Canonical rounding: Bye bye floating point arithmetic artifacts
ULP rounding is switched of as a default setting (can be enabled / disabled). As a default canonical rounding is switched on (can be disabled / enabled). New methods:
- mXparser.enableCanonicalRounding()
- mXparser.disableCanonicalRounding()
- mXparser.setCanonicalRounding(boolean)
- mXparser.checkIfCanonicalRounding
Argument extension – analogy to Function Extension
Now you can define user arguments implementing your own algorithm in source code.
Bugs fixed
- #168, #18 Exact special trigonometric values
- #192, #178 Logical operators precedence
- #172 “x + 4 * – 2”
v.4.3.3 (2019-01-27): Bug fix
v.4.3.2 (2019-01-25): Nuget package fix
v.4.3.0 (2019-01-19): Caprica – API improvement
Cancel ongoing calculation
- mXparser.cancelCurrentCalculation()
- mXparser.resetCancelCurrentCalculationFlag();
Set default options
- mXparser.setDefaultOptions()
User defined constants / units
- constant name can be surrounded by square bracket, i.e. [const]
- Expression.getMissingUserDefinedUnits()
Bug fixing
v.4.2.0 (2018-07-15): Aquaria – Major release
Broader types of decimal number literals
- No leading zero, i.e.: .2, .312, -.21
Fraction as number literals
- 1_2 is recognized as 1/2
- 2_3_4 is recognized as 2 + 3/4
- 17_5 is recognized as 17/5
- Just use Expression e = new Expression(“2_3_2 + 1_2”)
Double to fraction conversion
- mXparser.toFraction(double value) – double[]
- mXparser.toMixedFraction(double value) – double[]
- mXparser.fractionToString(double[] fraction) – String
- mXparser.toFractionString(double value) – String
- mXparser.toMixedFractionString(double value) – String
Disable / enable almost int rounding
- mXparser.enableAlmostIntRounding()
- mXparser.disableAlmostIntRounding()
- mXparser.checkIfAlmostIntRounding()
- mXparser.getEpsilon()
- mXparser.setEpsilon()
Variadic user defined functions
- Function f = new Function(“f(…) = sum(i, 1, [npar], par(i)^2 )”);
- [npar] – number of available parameters
- par(i) – parameter value
- body extended is supported
New special functions
- Gamma(x) – Gamma special function Γ(s)
- LambW0(x) – Lambert-W special function, principal branch 0, also called the omega function or product logarithm
- LambW1(x) – Lambert-W special function, branch -1, also called the omega function or product logarithm
- sgnGamma(x) – Signum of Gamma special function, Γ(s)
- logGamma(x) – Log Gamma special function, lnΓ(s)
- diGamma(x) – Digamma function as the logarithmic derivative of the Gamma special function, ψ(x)
- GammaL(s,x) – Lower incomplete gamma special function, γ(s,x)
- GammaU(s,x) – Upper incomplete Gamma special function, Γ(s,x)
- GammaP(s,x), GammaRegL(s,x) – Lower regularized P gamma special function, P(s,x)
- GammaQ(s,x), GammaRegU(s,x) – Upper regularized Q Gamma special function, Q(s,x)
- Beta(x,y) – The Beta special function B(x,y), also called the Euler integral of the first kind
- logBeta(x,y) – The Log Beta special function ln B(x,y), also called the Log Euler integral of the first kind, ln B(x,y)
- BetaInc(x,a,b) – The incomplete beta special function B(x; a, b), also called the incomplete Euler integral of the first kind
- BetaI(x,a,b), BetaReg(x,a,b) – The regularized incomplete beta (or regularized beta) special function I(x; a, b), also called the regularized incomplete Euler integral of the first kind
Degrees / Radians mode for trigonometrix
- mXparser.setDegreesMode()
- mXparser.setRadiansMode()
- mXparser.checkIfDegreesMode()
- mXparser.checkIfRadiansMode()
New operator – Tetration
- a^^n is recognized as a^a^a…^a – n times
Bugs fixed
- Argument.checkSyntax() #145
- Endless loop with factorial #136
- StringIndexOutOfBoundsException asking for tokens of empty expression #135
- Function.checkSyntax() always returns true #111
- Syntax for unary complement #114
- Iterative operators descending sequence #119
- checkSyntax() bug #80
- Very very very long processing time of gcd #91
- Priorities of “if”, “iff” and other calculus operations #82
Other framework support (binaries)
- .NET Core: 2.0, 2.1
- .NET Standard: 2.0
- .NET Framework: 4.7, 4.7.2
- JAVA: 1.9, 1.10
v.4.1.1 (2017-07-28): Aeries – checkSyntax() bug fixing
- Fixed: checkSyntax() returns true “already checked no errors” #75
v.4.1.0 (2017-07-09): Aeries – Major update
Various numeral systems
- Binary numbers literals
- Octal numbers literals
- Hexadecimal numbers literals
- Number literals with base between 1 and 36
- base(b, digit1, …, digitn) function to generate numbers in any given base
Leading zeros support
- 0001
- 0001.12e10
- …
Working with digits
- ndig(number, targetBase) function – number of digits – specified numeral system base
- ndig10(number) function – number of digits – base 10
- dig(number, targetBase, position) – digit at position – specified numeral system base
- dig10(number, position) – digit at position – base 10
Prime factorization
- nfact(number) – number of prime factors
- factval(number, factorId) – factor value
- factexp(number, factorId) – factor exponent
Not-a-Number
- [NaN] symbol
- isNaN(x) function
- coalesce(a1,…,an) function – first non-NaN value
Statistics
- med(a1, a2, …, an) – sample median
- mode(a1, a2, …, an) – sample mode
Boolean logic
- [true] symbol
- [false] symbol
- or(a1,…an) – variadic or
- and(a1,…an) – variadic and
- xor(a1,…an) – variadic xor
Other functions
- root(order, number) – root + support for negative numbers and odd-order
- arcsec(x) – inverse trigonometric secant
- arccsc(x) – inverse trigonometric cosecant
- ndist(v1, v2, … vn) – number of distinct values
- argmin(v1, v2, … vn) – index of minimum
- argmax(v1, v2, … vn) – index of maximum
New operator
- % support (i.e. 2%, x%)
Calculus
- der( f(x), x, x0 ) – alternative syntax for derivative (no need to define x as argument)
Built-in tokens
- Option to override built-in tokens
- Possibility to remove built-in tokens
- Possibility to change built-in token
- Key words: syntax + since
- Get key words list
Working with expression tokens
- Get missing user defined arguments
- Get missing user defined functions
Bugs fixed
- Dependent arguments and StackOverflowError #35 (introduction of recursion calls counter)
- FunctionExtension.calculate #32
v.4.0.0 (2017-03-27): Major update: Bitwise Operators, Numbers in scientific notation, Units, Physical & Astronomical Constants, Equations solving via finding function root, Better tokens handling, Function Extensions – possibility of using your own implementation, Bugs fixed!
Bitwise Operators
- @~ – Bitwise unary complement
- @& – Bitwise AND
- @^ – Bitwise exclusive OR
- @| – Bitwise inclusive OR
- @<< – Signed left shift
- @>> – Signed right shift
Numbers in scientific notation
- 1.2e10
- 1.2e-10
- 1.2e+10
- 1.2E10
- 1.2E-10
- 1.2E+10
- …
Units
- [%] – <Ratio, Fraction> Percentage = 0.01
- [%%] – <Ratio, Fraction> Promil, Per mille = 0.001
- [Y] – Septillion / Yotta = 10^24
- [sept] – Septillion / Yotta = 10^24
- [Z] – Sextillion / Zetta = 10^21
- [sext] – Sextillion / Zetta = 10^21
- [E] – Quintillion / Exa = 10^18
- [quint] – Quintillion / Exa = 10^18
- [P] – Quadrillion / Peta = 10^15
- [quad] – Quadrillion / Peta = 10^15
- [T] – Trillion / Tera = 10^12
- [tril] – Trillion / Tera = 10^12
- [G] – Billion / Giga = 10^9
- [bil] – Billion / Giga = 10^9
- [M] – Million / Mega = 10^6
- [mil] – Million / Mega = 10^6
- [k] – Thousand / Kilo = 10^3
- [th] – Thousand / Kilo = 10^3
- [hecto] – Hundred / Hecto = 10^2
- [hund] – Hundred / Hecto = 10^2
- [deca] – Ten / Deca = 10
- [ten] – Ten / Deca = 10
- [deci] – Tenth / Deci = 0.1
- [centi] – Hundredth / Centi = 0.01
- [milli] – Thousandth / Milli = 0.001
- [mic] – Millionth / Micro = 10^-6
- [n] – Billionth / Nano = 10^-9
- [p] – Trillionth / Pico = 10^-12
- [f] – Quadrillionth / Femto = 10^-15
- [a] – Quintillionth / Atoo = 10^-18
- [z] – Sextillionth / Zepto = 10^-21
- [y] – Septillionth / Yocto = 10^-24
- [m] – Metre / Meter (m=1)
- [km] – Kilometre / Kilometer (m=1)
- [cm] – Centimetre / Centimeter (m=1)
- [mm] – Millimetre / Millimeter (m=1)
- [inch] – Inch (m=1)
- [yd] – Yard (m=1)
- [ft] – Feet (m=1)
- [mile] – Mile (m=1)
- [nmi] – Nautical mile (m=1)
- [m2] – Square metre / Square meter (m=
- [cm2] – Square centimetre / Square cent
- [mm2] – Square millimetre / Square mill
- [are] – Are (m=1)
- [ha] – Hectare (m=1)
- [acre] – Acre (m=1)
- [km2] – Square kilometre / Square kilom
- [mm3] – Cubic millimetre / Cubic mill
- [cm3] – Cubic centimetre / Cubic cent
- [m3] – Cubic metre / Cubic meter (m=
- [km3] – Cubic kilometre / Cubic kilom
- [ml] – Millilitre / Milliliter (m=1)
- [l] – Litre / Liter (m=1)
- [gall] – Gallon (m=1)
- [pint] – Pint (m=1)
- [s] – Second (s=1)
- [ms] – Millisecond (s=1)
- [min] – Minute (s=1)
- [h] – Hour (s=1)
- [day] – Day (s=1)
- [week] – Week (s=1)
- [yearj] – Julian year = 365.25 days (s=1)
- [kg] – Kilogram (kg=1)
- [gr] – Gram (kg=1)
- [mg] – Milligram (kg=1)
- [dag] – Decagram (kg=1)
- [t] – Tonne (kg=1)
- [oz] – Ounce (kg=1)
- [lb] – Pound (kg=1)
- [b] – Bit (bit=1)
- [kb] – Kilobit (bit=1)
- [Mb] – Megabit (bit=1)
- [Gb] – Gigabit (bit=1)
- [Tb] – Terabit (bit=1)
- [Pb] – Petabit (bit=1)
- [Eb] – Exabit (bit=1)
- [Zb] – Zettabit (bit=1)
- [Yb] – Yottabit (bit=1)
- [B] – Byte (bit=1)
- [kB] – Kilobyte (bit=1)
- [MB] – Megabyte (bit=1)
- [GB] – Gigabyte (bit=1)
- [TB] – Terabyte (bit=1)
- [PB] – Petabyte (bit=1)
- [EB] – Exabyte (bit=1)
- [ZB] – Zettabyte (bit=1)
- [YB] – Yottabyte (bit=1)
- [J] – Joule (m=1, kg=1, s=1)
- [eV] – Electronovolt (m=1, kg=1, s=1
- [keV] – Kiloelectronovolt (m=1, kg=1,
- [MeV] – Megaelectronovolt (m=1, kg=1,
- [GeV] – Gigaelectronovolt (m=1, kg=1,
- [TeV] – Teraelectronovolt (m=1, kg=1,
- [m/s] – Metre / Meter per second (m=1,
- [km/h] – Kilometre / Kilometer per hour
- [mi/h] – Mile per hour (m=1, s=1)
- [knot] – Knot (m=1, s=1)
- [m/s2] – Metre / Meter per squar
- [km/h2] – Kilometre / Kilometer p
- [mi/h2] – Mile per square hour (m
- [rad] – Radian (rad=1)
- [deg] – Degree of arc (rad=1)
- [‘] – Minute of arc (rad=1)
- [”] – Second of arc (rad=1)
Physical Constants
- – Light speed in vacuum [m/s] (m=1, s=1)
- [G.] – Gravitational constant (m=1, kg=1, s=1)]
- [g] – Gravitational acceleration on Earth [m/s^2] (m=1, s=1)
- [hP] – Planck constant (m=1, kg=1, s=1)
- [h-] – Reduced Planck constant / Dirac constant (m=1, kg=1, s=1)]
- [lP] – Planck length [m] (m=1)
- [mP] – Planck mass [kg] (kg=1)
- [tP] – Planck time [s] (s=1)
Astronomical Constants
- [ly] – Light year [m] (m=1)
- [au] – Astronomical unit [m] (m=1)
- [pc] – Parsec [m] (m=1)
- [kpc] – Kiloparsec [m] (m=1)
- [Earth-R-eq – ]Earth equatorial radius [m] (m=1)
- [Earth-R-po] – Earth polar radius [m] (m=1)
- [Earth-R] – Earth mean radius (m=1)
- [Earth-M] – Earth mass [kg] (kg=1)
- [Earth-D] – Earth-Sun distance – semi major axis [m] (m=1)
- [Moon-R] – Moon mean radius [m] (m=1)
- [Moon-M] – Moon mass [kg] (kg=1)
- [Moon-D] – Moon-Earth distance – semi major axis [m] (m=1)
- [Solar-R] – Solar mean radius [m] (m=1)
- [Solar-M] – Solar mass [kg] (kg=1)
- [Mercury-R] – Mercury mean radius [m] (m=1)
- [Mercury-M] – – Mercury mass [kg] (kg=1)
- [Mercury-D]Mercury-Sun distance – semi major axis [m] (m=1)
- [Venus-R] – Venus mean radius [m] (m=1)
- [Venus-M] – Venus mass [kg] (kg=1)
- [Venus-D] – Venus-Sun distance – semi major axis [m] (m=1)
- [Mars-R] – Mars mean radius [m] (m=1)
- [Mars-M] – Mars mass [kg] (kg=1)
- [Mars-D] – Mars-Sun distance – semi major axis [m] (m=1)
- [Jupiter-R] – Jupiter mean radius [m] (m=1)
- [Jupiter-M] – Jupiter mass [kg] (kg=1)
- [Jupiter-D] – Jupiter-Sun distance – semi major axis [m] (m=1)
- [Saturn-R] – Saturn mean radius [m] (m=1)
- [Saturn-M] – Saturn mass [kg] (kg=1)
- [Saturn-D] – Saturn-Sun distance – semi major axis [m] (m=1)
- [Uranus-R] – Uranus mean radius [m] (m=1)
- [Uranus-M] – Uranus mass [kg] (kg=1)
- [Uranus-D] – Uranus-Sun distance – semi major axis [m] (m=1)
- [Neptune-R] – Neptune mean radius [m] (m=1)
- [Neptune-M] – Neptune mass [kg] (kg=1)
- [Neptune-D] – Neptune-Sun distance – semi major axis [m] (m=1)
Equations solving via finding function root
- solve( f(x), x, a, b ) – solving f(x) = 0
Better tokens handling
- Better handling of invalid / not known tokens
- Looks like functionality
Function Extensions – possibility of using your own implementation
- FunctionExtension interface + new constructor in Function class
Bugs fixed
- Exception thrown by getCopyOfInitialTokens() #21
- System.format.exception – system.IO.EndOfStreamException #20
- Expression relating factorial “!” cause the application to hang #17
- Negative sign missing when is right of operators #16
- Negative in if statement #12
- Speed when debugging #11
- User defined arguments ending in e #10
New regression tests – current tests coverage:
- 622 expression related tests
- 114 syntax related tests
- 30 api related tests
- 20 performance tests
Enjoy 🙂
Nuget – Package Manager (C#, F#, Visual Basic, …)
Install-Package
MathParser.org-mXparser
-Version
6.1.0
dotnet add package
MathParser.org-mXparser
--version
6.1.0
<PackageReference Include=
"MathParser.org-mXparser"
Version=
"6.1.0"
/>
Maven – Dependency (Java, Kotlin, Scala, Groovy, …)
<dependency>
<groupid>org.mariuszgromada.math
</groupid>
<artifactid>MathParser.org-mXparser
</artifactid>
<version>6.1.0
</version>
</dependency>
Maven – Gradle
implementation
'org.mariuszgromada.math:MathParser.org-mXparser:6.1.0'
CMake – Dependency / FetchContent (C++, MSVC, LLVM/Clang, GNU/GCC, MinGW, MSYS2, WSL, Windows, Linux, Unix, MacOS)
include(FetchContent)
FetchContent_Declare(
MathParserOrgMxParser
GIT_REPOSITORY https://github.com/mariuszgromada/MathParser.org-mXparser.git
GIT_TAG v.6.1.0
SOURCE_SUBDIR CURRENT/cpp/lib
)
FetchContent_MakeAvailable(MathParserOrgMxParser
)
target_link_libraries(YourExecutable MathParserOrgMxParser
)
GitHub
git clone
https://github.com/mariuszgromada/MathParser.org-mXparser
OTHER DOWNLOAD OPTIONS
Download latest release – v.6.1.0 Sagitara: .NET bin onlyDownload latest release – v.6.1.0 Sagitara: JAVA bin onlyDownload latest release – v.6.1.0 Sagitara: bin + doc
NEWS FROM MATHPARSER.ORG
SOURCE CODE
Source code .zipSource code .tar.gz
View on GitHubMathSpace.pl
My other creative spaces
mXparser – v.3.0.0 – released!
v.3.0.0 (2016-05-18): Major update: Random numbers, Probability distributions & Random variables, Double precision rounding, ULP rounding, epsilon comparison, New special functions.
.NET: since v.3.0.0 dll – different private key used for signing.
Random numbers – new functions
- rUni(a, b) – Random number from uniform continuous distribution U(a,b)
- rUnid(a, b) – Random number from uniform discrete distribution U{a,b}
- rNor(m, s) – Random number from normal distribution N(m,s)
- rList(a1, a2, …, an) – Random number from given list of numbers
Probability distributions – new functions
- pUni(x, a, b) – Probability distribution function – Uniform continuous distribution U(a,b)
- cUni(x, a, b) – Cumulative distribution function – Uniform continuous distribution U(a,b)
- qUni(q, a, b) – Quantile function (inverse cumulative distribution function) – Uniform continuous distribution U(a,b)
- pNor(x, a, b) – Probability distribution function – Normal distribution N(m,s)
- cNor(x, a, b) – Cumulative distribution function – Normal distribution N(m,s)
- qNor(q, m, s) – Quantile function (inverse cumulative distribution function) – Normal distribution N(m,s)
Random variables (predefined) – acting as random constant (no parameters)
- [Int] – Random variable – random integer
- [Int1] – Random variable – random integer – Uniform discrete distribution U{-10^1, 10^1}
- [Int2] – Random variable – random integer – Uniform discrete distribution U{-10^2, 10^2}
- [Int3] – Random variable – random integer – Uniform discrete distribution U{-10^3, 10^3}
- [Int4] – Random variable – random integer – Uniform discrete distribution U{-10^4, 10^4}
- [Int5] – Random variable – random integer – Uniform discrete distribution U{-10^5, 10^5}
- [Int6] – Random variable – random integer – Uniform discrete distribution U{-10^6, 10^6}
- [Int7] – Random variable – random integer – Uniform discrete distribution U{-10^7, 10^7}
- [Int8] – Random variable – random integer – Uniform discrete distribution U{-10^8, 10^8}
- [Int9] – Random variable – random integer – Uniform discrete distribution U{-10^9, 10^9}
- [nat] – Random variable – random natural number including 0
- [nat1] – Random variable – random natural number including 0 – Uniform discrete distribution U{0, 10^1}
- [nat2] – Random variable – random natural number including 0 – Uniform discrete distribution U{0, 10^2}
- [nat3] – Random variable – random natural number including 0 – Uniform discrete distribution U{0, 10^3}
- [nat4] – Random variable – random natural number including 0 – Uniform discrete distribution U{0, 10^4}
- [nat5] – Random variable – random natural number including 0 – Uniform discrete distribution U{0, 10^5}
- [nat6] – Random variable – random natural number including 0 – Uniform discrete distribution U{0, 10^6}
- [nat7] – Random variable – random natural number including 0 – Uniform discrete distribution U{0, 10^7}
- [nat8] – Random variable – random natural number including 0 – Uniform discrete distribution U{0, 10^8}
- [nat9] – Random variable – random natural number including 0 – Uniform discrete distribution U{0, 10^9}
- [Nat] – Random variable – random natural number
- [Nat1] – Random variable – random natural number – Uniform discrete distribution U{1, 10^1}
- [Nat2] – Random variable – random natural number – Uniform discrete distribution U{1, 10^2}
- [Nat3] – Random variable – random natural number – Uniform discrete distribution U{1, 10^3}
- [Nat4] – Random variable – random natural number – Uniform discrete distribution U{1, 10^4}
- [Nat5] – Random variable – random natural number – Uniform discrete distribution U{1, 10^5}
- [Nat6] – Random variable – random natural number – Uniform discrete distribution U{1, 10^6}
- [Nat7] – Random variable – random natural number – Uniform discrete distribution U{1, 10^7}
- [Nat8] – Random variable – random natural number – Uniform discrete distribution U{1, 10^8}
- [Nat9] – Random variable – random natural number – Uniform discrete distribution U{1, 10^9}
- [Nor] – Random variable – Normal distribution N(0,1)
Double precision rounding
- round(value, places) – decimal rounding (half-up)
New special functions
- erf(x) – Gauss error function
- erfc(x) – Gauss complementary error function
- erfInv(x) – Inverse Gauss error function
- erfcInv(x) – Inverse Gauss complementary error function
Other functions
- ulp(x) – Unit in The Last Place
Binary relations – epsilon+ulp comparison – enabled as default
If a rel b then applied epsilon is maximum from epsilon and ulp(b) : i.e. a eq b if a \in [b-eps; b+eps] inclusive
- mXparser.setExactComparison()
- mXparser.setEpsilonComparison()
- mXparser.setEpsilon(double epsilon)
- mXparser.setDefaultEpsilon()
- mXparser.getEpsilon()
- mXparser.checkIfEpsilonMode()
- mXparser.checkIfExactMode()
Intelligent automatic double ULP rounding – enabled as default
** Try 0.1 + 0.1 + 0.1 – it will give exact 0.3 🙂 **
- mXparser.enableUlpRounding()
- mXparser.disableUlpRounding()
- mXparser.checkIfUlpRounding()
Parser tokens definition now public in API
- mxparser.parsertokens
Expression after tokenization now public in API
- Expression.getCopyOfInitialTokens()
- mxparser.parsertokens
- mXparser.consolePrintTokens()
Significant reorganization of code
- Mainly mathcollection & parser tokens
Backwards compatibility
- is preserved for String API, Expression, Function, Argument, Constnat, …
- other public API was reorganized (mainly mxparser.mathcollection)
Bugs fixed
- bugs related to iterated operators
Other changes
- Many new regression tests
Enjoy 🙂
mXparser 3.0.0 is very close to release
Dear All,
I am happy to announce that mXparser 3.0.0 is very close to release. Change will bring a lot of new features 🙂 including:
- Random numbers
- Probability distributions
- Random variables
- Double precision rounding
- Intelligent automatic ULP rounding to minimize issues similar to 0.1 + 0.1 + 0.1 = 0.30000000000000004
- Epsilon comparison from binary relations
- New special functions (non-elementary)
- Significant code reorganization
Best regards
mXparser on nuget.org
The mXparser package is now available on the nuget.org site.
MathParser.org-mXparser on nuget.org
PM> Install-Package MathParser.org-mXparser
Best regards,
Mariusz Gromada
mXparser – v.2.4.0 – Average, Variance, Standard deviation, New iterated operators
Dear All,
I am happy to announce that new version of mXparser has just been released. Update delivers below functionalities
New variadic functions
– Mean value: mean(a1, a2, …, an)
import org.mariuszgromada.math.mxparser.*; ... Expression e = new Expression("mean(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)"); mXparser.consolePrintln("Res: " + e.calculate());
[mXparser-v.2.4.0] Res: 5.5
– Bias-corrected sample variance: var(a1, a2, …, an)
import org.mariuszgromada.math.mxparser.*; ... Expression e = new Expression("var(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)"); mXparser.consolePrintln("Res: " + e.calculate());
[mXparser-v.2.4.0] Res: 9.166666666666666
– Bias-corrected sample standard deviation: std(a1, a2, …, an)
import org.mariuszgromada.math.mxparser.*; ... Expression e = new Expression("std(1, 2, 3, 4, 5, 6, 7, 8, 9, 10)"); mXparser.consolePrintln("Res: " + e.calculate());
[mXparser-v.2.4.0] Res: 3.0276503540974917
New iterated operators
– Minimum from sample function values: mini(i, from, to, f(i), <by>)
import org.mariuszgromada.math.mxparser.*; ... Expression e = new Expression("mini(x, -pi, pi, sin(x), 2*pi/1000)"); mXparser.consolePrintln("Res: " + e.calculate());
[mXparser-v.2.4.0] Res: -1.0
– Maximum from sample function values: maxi(i, from, to, f(i), <by>)
import org.mariuszgromada.math.mxparser.*; ... Expression e = new Expression("maxi(x, -pi, pi, sin(x), 2*pi/1000)"); mXparser.consolePrintln("Res: " + e.calculate());
[mXparser-v.2.4.0] Res: 1.0
– Average from sample function values: avg(i, from, to, f(i), <by>)
import org.mariuszgromada.math.mxparser.*; ... Expression e = new Expression("avg(x, -pi, pi, sin(x), 2*pi/1000)"); mXparser.consolePrintln("Res: " + e.calculate());
[mXparser-v.2.4.0] Res: 4.8615748597837905E-17
– Bias-corrected variance from sample function values: vari(i, from, to, f(i), <by>)
import org.mariuszgromada.math.mxparser.*; ... Expression e = new Expression("vari(x, -pi, pi, sin(x), 2*pi/1000)"); mXparser.consolePrintln("Res: " + e.calculate());
[mXparser-v.2.4.0] Res: 0.4999999999999962
– Bias-corrected standard deviation from sample function values: stdi(i, from, to, f(i), <by>)
import org.mariuszgromada.math.mxparser.*; ... Expression e = new Expression("stdi(x, -pi, pi, sin(x), 2*pi/1000)"); mXparser.consolePrintln("Res: " + e.calculate());
[mXparser-v.2.4.0] Res: 0.7071067811865449
Enjoy 🙂
Mariusz Gromada
mXparser v.2.3.0: Extensive prime numbers support, Multi-threading performance tests, New built-in functions and constants!
Major update of the library was released on Jan, 17th 2016.
Extensive support for the prime numbers:
- new class PrimesCache in mathcollection
- MathFunctions extended with primality test
- ispr(n) – Primality test function supported in expressions
- Pi(n) – Prime Counting function supported in expressions
- mXparser.initPrimesCache() methods (and others) to initialize prime numbers cache
Some special functions supported
- Ei(x) – Exponential integral function supported in expressions
- li(x) – Logarithmic integral function supported in expressions
- Li(x) – Offset logarithmic integral function supported in expressions
New constants
- [G] – Gompertz Constant OEIS A073003 supported in expressions
- [li2] – li(2) A069284 – supported in expressions
Multithreading performance tests
- Default number of cores taken from the environment
- Possibility to change number of default threads
- PerformanceTests.start(int threadsNum)
- mXparser.setThreadsNumber(int threadsNumber)
New regression tests to cover new functionalities
Download mXparser-v.2.3.0
Enjoy 🙂
Mariusz Gromada
mXparser v.2.2.0: Android is coming
mXparser and Android
Since mXparser-v.2.2.0 library is being always tested also on the Android platform. I can confirm that all regression tests were passed without any problems. Recommended library to use directly in the Android project is mXparser built with JDK 1.7.
Console output available in String
In terms of System.out.println() Android behavior is different than JVM causing that all data passed to Console on JVM is printed in Log.cat by Android Dalvik. If you will use mXparser.consolePrintln()/Print() methods instead of System.out. equivalents you will also get access to the console output string containing printed data. Please refer to the API specification of the mXparser class.
Enjoy 🙂
Mariusz Gromada