AngouriMath

Navigation

← Back to list of members

LessOrEqualThan​(AngouriMath.​Entity,​AngouriMath.​Entity)

 Method (no overloads)

Parameter "a"

Left argument node of which the less than or equal node will be taken

Parameter "b"

Right argument node of which the less than or equal node function will be taken

Returns

A node

Example

using System;
using static AngouriMath.MathS;

var (x, y) = Var("x", "y");

Console.WriteLine(GreaterThan(x, y));
Console.WriteLine(GreaterThan(6, 5));
Console.WriteLine(GreaterThan(6, 5).EvalBoolean());
Console.WriteLine(GreaterThan(6, 6).EvalBoolean());
Console.WriteLine("----------------------------------");
Console.WriteLine(LessThan(x, y));
Console.WriteLine(LessThan(6, 5));
Console.WriteLine(LessThan(6, 5).EvalBoolean());
Console.WriteLine(LessThan(6, 6).EvalBoolean());
Console.WriteLine("----------------------------------");
Console.WriteLine(GreaterOrEqualThan(x, y));
Console.WriteLine(GreaterOrEqualThan(6, 5));
Console.WriteLine(GreaterOrEqualThan(6, 5).EvalBoolean());
Console.WriteLine(GreaterOrEqualThan(6, 6).EvalBoolean());
Console.WriteLine("----------------------------------");
Console.WriteLine(LessOrEqualThan(x, y));
Console.WriteLine(LessOrEqualThan(6, 5));
Console.WriteLine(LessOrEqualThan(6, 5).EvalBoolean());
Console.WriteLine(LessOrEqualThan(6, 6).EvalBoolean());
Console.WriteLine("----------------------------------");
var statement1 = GreaterThan(Sqr(x), 5);
Console.WriteLine(statement1);
Console.WriteLine(statement1.Solve("x"));
Console.WriteLine("----------------------------------");
var statement2 = GreaterThan(Sqr(x), 16) & LessThan(x, y);
Console.WriteLine(statement2);
Console.WriteLine(statement2.Solve("x"));
Console.WriteLine("----------------------------------");
var statement3 = LessThan(Sqr(x), 16) & GreaterThan(x, 2);
Console.WriteLine(statement3);
Console.WriteLine(statement3.Solve("x"));

Prints
x > y
6 > 5
True
False
----------------------------------
x < y
6 < 5
False
False
----------------------------------
x >= y
6 >= 5
True
True
----------------------------------
x <= y
6 <= 5
False
True
----------------------------------
x ^ 2 > 5
(-oo; -sqrt(20) / 2) \/ (sqrt(20) / 2; +oo)
----------------------------------
x ^ 2 > 16 and x < y
((-oo; -4) \/ (4; +oo)) /\ (-oo; -y / (-1))
----------------------------------
x ^ 2 < 16 and x > 2
(2; 4)

























Angouri © 2019-2023 · Project's repo · Site's repo · Octicons · Transparency · 1534 pages online