Skip to content

Releases: mariuszgromada/MathParser.org-mXparser

v.5.0.2 (Leonis): fix #258

22 Apr 17:22
f83e7d6
Compare
Choose a tag to compare

v.5.0.1 (2022-04-10): Leonis - a major release: Implied Multiplication, Unicode Math Symbols, Additional Probability Distributions

10 Apr 22:17
84815fe
Compare
Choose a tag to compare

Release notes:

Did you find the software useful? If yes:

Android App that is powered by MathParser.org-mXparser:

Other websites:

Gemoni - bugs fixing

26 Jan 00:03
Compare
Choose a tag to compare

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)

Download mXparser - Math Parser Java C# Library

Gemoni

14 Jan 21:27
Compare
Choose a tag to compare

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

Example 1

Expression e = new Expression("0.1 + 0.1 + 0.1");
System.out.println("Pure Java             : 0.1 + 0.1 + 0.1 = " + (0.1 + 0.1 + 0.1));
System.out.println("mXparser              : 0.1 + 0.1 + 0.1 = " + e.calculate());
mXparser.disableCanonicalRounding();
System.out.println("mXparser canonical off: 0.1 + 0.1 + 0.1 = " + e.calculate());
===========
Pure Java             : 0.1 + 0.1 + 0.1 = 0.30000000000000004
mXparser              : 0.1 + 0.1 + 0.1 = 0.3
mXparser canonical off: 0.1 + 0.1 + 0.1 = 0.30000000000000004

Example 2

Expression e = new Expression("(-1/6.2)^(-3)");
System.out.println("Pure Java             : (-1/6.2)^(-3) = " + Math.pow(-1/6.2, -3));
System.out.println("mXparser              : (-1/6.2)^(-3) = " + e.calculate());
mXparser.disableCanonicalRounding();
System.out.println("mXparser canonical off: (-1/6.2)^(-3) = " + e.calculate());
===========
Pure Java             : (-1/6.2)^(-3) = -238.32800000000003
mXparser              : (-1/6.2)^(-3) = -238.328
mXparser canonical off: (-1/6.2)^(-3) = -238.32800000000003

Argument extension - analogy to Function Extension

Now you can define user arguments implementing your own algorithm in source code.

Example

class PiMultArgExt implements ArgumentExtension {
	private int multiple = 0;
	public double getArgumentValue() {
	    multiple++;
		return  MathConstants.PI * multiple;
	}
	public PiMultArgExt clone() {
	    return new PiMultArgExt();
	}
}

Argument x = new Argument("x", new PiMultArgExt());
Expression e = new Expression("x/pi", x);
System.out.println("1st calc exec: " + e.calculate());
System.out.println("2nd calc exec: " + e.calculate());
System.out.println("3rd calc exec: " + e.calculate());
===========
1st calc exec: 1.0
2nd calc exec: 2.0
3rd calc exec: 3.0

Bugs fixed

  • #168, #18 Exact special trigonometric values
  • #192, #178 Logical operators precedence
  • #172 "x + 4 * - 2"

Download mXparser - Math Parser Java C# Library

Caprica - bugs fixing

28 Jan 19:38
cf4b5b0
Compare
Choose a tag to compare

Caprica

19 Jan 01:22
Compare
Choose a tag to compare

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

  • #153, #162 Endless Loop
  • #164 PrimeCache out of memory - handling error / exception

Download mXparser - Math Parser Java C# Library

Aquaria

16 Jul 20:54
Compare
Choose a tag to compare

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

New regression tests - current tests coverage:

  • 1155 expression related tests
  • 245 syntax related tests
  • 65 API related tests
  • 20 performance tests

https://github.com/mariuszgromada/MathParser.org-mXparser/milestone/2

Enjoy :-)

Download mXparser - Math Parser Java C# Library

Aeries - checkSyntax() bug fixing

29 Jul 12:07
Compare
Choose a tag to compare

v.4.1.1 (2017-07-28): Aeries - checkSyntax() bug fixing

  • Fixed: checkSyntax() returns true "already checked no errors" #75

Enjoy :-)

Download mXparser - Math Parser Java C# Library

Aeries

09 Jul 09:30
Compare
Choose a tag to compare

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

New regression tests - current tests coverage:

  • 829 expression related tests
  • 207 syntax related tests
  • 51 api related tests
  • 20 performance tests

Enjoy :-)

Download mXparser - Math Parser Java C# Library

Port to various .NET frameworks

17 Apr 10:05
Compare
Choose a tag to compare

v.4.0.0.2 (2017-04-17): Port to various .NET frameworks

  • .NET Core
  • .NET Standard
  • .NET PCL (supporting i.e.: Windows Phone, MonoTouch, etc.)
  • Xamarin.Android
  • Xamarin.iOS

Enjoy :-)

Download mXparser - Math Parser Java C# Library