MathParser.org-mXparser 4.4.2

.NET Core 1.0 .NET Standard 1.0 .NET Framework 2.0
Additional Details

Only versions 5.x of MathParser.org-mXparser are going to be maintained. From now on all the previous versions are legacy. API of versions 5.x are fully backward compatible with all 4.x. Technical migrating to 5.x should be hassle free.

There is a newer version of this package available.
See the version list below for details.
The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
Install-Package MathParser.org-mXparser -Version 4.4.2
dotnet add package MathParser.org-mXparser --version 4.4.2
<PackageReference Include="MathParser.org-mXparser" Version="4.4.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MathParser.org-mXparser --version 4.4.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: MathParser.org-mXparser, 4.4.2"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install MathParser.org-mXparser as a Cake Addin
#addin nuget:?package=MathParser.org-mXparser&version=4.4.2

// Install MathParser.org-mXparser as a Cake Tool
#tool nuget:?package=MathParser.org-mXparser&version=4.4.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

v.4.4.2 (2020-01-26): Gemoni - Bug fixing

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"

If you find the software useful you might consider below information

Scalar-Lite

Thank you!

Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows
.NET Core netcoreapp1.0 netcoreapp1.1 netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard1.0 netstandard1.1 netstandard1.2 netstandard1.3 netstandard1.4 netstandard1.5 netstandard1.6 netstandard2.0 netstandard2.1
.NET Framework net20 net35 net40 net403 net45 net451 net452 net46 net461 net462 net463 net47 net471 net472 net48
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen30 tizen40 tizen60
Universal Windows Platform uap uap10.0
Windows Phone wp8 wp81 wpa81
Windows Store netcore netcore45 netcore451
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

NuGet packages (6)

Showing the top 5 NuGet packages that depend on MathParser.org-mXparser:

Package Downloads
FrontLookCoreLibraryAssembly

This package adds an asp.net core class library!

LightConversion.Topas4

Library to control optical parametric amplifiers by Light Conversion.

TTRPG.Engine

Manage game algorithms in serializable structures. https://github.com/timjen3/ttrpg-engine/blob/main/Readme.md

ProCode.Business

Package Description

Vsa.Framework

Vsa Framework

GitHub repositories (3)

Showing the top 3 popular GitHub repositories that depend on MathParser.org-mXparser:

Repository Stars
ArduPilot/MissionPlanner
Mission Planner Ground Control Station (c# .net)
MatterHackers/MatterControl
3D printing software for Windows, Mac and Linux
MUnique/OpenMU
This project aims to create an easy to use, extendable and customizable server for a MMORPG called "MU Online".
Version Downloads Last updated
5.0.6 3,268 5/31/2022
5.0.5 317 5/29/2022
5.0.4 646 5/22/2022
5.0.3 126 5/21/2022
5.0.2 5,750 4/18/2022
5.0.1 1,194 4/10/2022
5.0.0 87 4/10/2022
4.4.3 490 5/28/2022
4.3.4 93 5/27/2022

v.4.4 Gemoni: API improvements: 1. Canonical rounding solving the problem of floating-point arithmetic artifact, 2. ArgumentExtension allowing user defined arguments implementation via source code, 3. Binaries also covering new frameworks: .NET Core 3.1, .NET Standard 2.1, .NET Framework 4.8