# Evaluating relations

## Case 1: Binary relation “=”

$$2=3$$

// JAVA: import org.mariuszgromada.math.mxparser.*;
// C#: using org.mariuszgromada.math.mxparser;
// ...
Expression e = new Expression("2=3");
mXparser.consolePrintln("Res: " + e.getExpressionString() + " = " + e.calculate());

[mXparser-v.5.2.1] Res: 2=3 = 0.0


## Case 2: Binary relation “<“

$$2<3$$

// JAVA: import org.mariuszgromada.math.mxparser.*;
// C#: using org.mariuszgromada.math.mxparser;
// ...
Expression e = new Expression("2<3");
mXparser.consolePrintln("Res: " + e.getExpressionString() + " = " + e.calculate());

[mXparser-v.5.2.1] Res: 2<3 = 1.0


## Case 3: Boolean operator “OR”

$$(2=3)\vee(2<3)$$

// JAVA: import org.mariuszgromada.math.mxparser.*;
// C#: using org.mariuszgromada.math.mxparser;
// ...
Expression e = new Expression("(2=3) | (2<3)");
mXparser.consolePrintln("Res: " + e.getExpressionString() + " = " + e.calculate());

[mXparser-v.5.2.1] Res: (2=3) | (2<3) = 1.0


## Case 4: Boolean operator “AND”

$$(2=3)\wedge(2<3)$$

// JAVA: import org.mariuszgromada.math.mxparser.*;
// C#: using org.mariuszgromada.math.mxparser;
// ...
Expression e = new Expression("(2=3) & (2<3)");
mXparser.consolePrintln("Res: " + e.getExpressionString() + " = " + e.calculate());

[mXparser-v.5.2.1] Res: (2=3) & (2<3) = 0.0

###### Nuget – Package Manager

Install-Package MathParser.org-mXparser -Version 6.0.0

Nuget – .NET CLI

dotnet add package MathParser.org-mXparser --version 6.0.0

Nuget – Package Reference

<PackageReference Include="MathParser.org-mXparser" Version="6.0.0"/>

###### Maven – Dependency

<dependency><groupid>org.mariuszgromada.math</groupid><artifactid>MathParser.org-mXparser</artifactid><version>6.0.0</version></dependency>

###### Maven – Gradle

implementation 'org.mariuszgromada.math:MathParser.org-mXparser:6.0.0'

###### Maven – Gradle (Kotlin)

implementation("org.mariuszgromada.math:MathParser.org-mXparser:6.0.0")

###### GitHub

git clone https://github.com/mariuszgromada/MathParser.org-mXparser

## My other creative spaces

###### DONATION
Did you find the software useful?
Please consider donation 🙂