Less

x<y

yields True if is determined to be less than .

x1<x2<x3

yields True if the form a strictly increasing sequence.

Details

  • Less is also known as strong inequality or strict inequality.
  • Less gives True or False when its arguments are real numbers.
  • Less does some simplification when its arguments are not numbers.
  • For exact numeric quantities, Less internally uses numerical approximations to establish numerical ordering. This process can be affected by the setting of the global variable $MaxExtraPrecision.

Examples

open allclose all

Basic Examples  (2)

Compare numbers:

Represent an inequality:

Scope  (9)

Numeric Inequalities  (7)

Inequalities are defined only for real numbers:

Compare rational numbers:

Approximate numbers that differ in at most their last eight binary digits are considered equal:

Compare an exact numeric expression and an approximate number:

Compare two exact numeric expressions; a numeric test may suffice to prove inequality:

Disproving this inequality requires symbolic methods:

Symbolic and numeric methods used by Less are insufficient to disprove this inequality:

Use RootReduce to decide the sign of algebraic numbers:

Numeric methods used by Less do not use sufficient precision to prove this inequality:

RootReduce proves the inequality using exact methods:

Increasing $MaxExtraPrecision may also prove the inequality:

Symbolic Inequalities  (2)

Symbolic inequalities remain unevaluated, since x may not be a real number:

Use Refine to reevaluate the inequality assuming that x is real:

A symbolic inequality:

Use Reduce to find an explicit description of the solution set:

Use FindInstance to find a solution instance:

Use Minimize to optimize over the inequality-defined region:

Use Refine to simplify under the inequality-defined assumptions:

Properties & Relations  (12)

The negation of two-argument Less is GreaterEqual:

The negation of three-argument Less does not simplify automatically:

Use LogicalExpand to express it in terms of two-argument GreaterEqual:

This is not equivalent to three-argument GreaterEqual:

When Less cannot decide inequality between numeric expressions it returns unchanged:

FullSimplify uses exact symbolic transformations to disprove the inequality:

Negative[x] is equivalent to :

Use Reduce to solve inequalities:

Use FindInstance to find solution instances:

Use RegionPlot and RegionPlot3D to visualize solution sets of inequalities:

Inequality assumptions:

Use Minimize and Maximize to solve optimization problems constrained by inequalities:

Use NMinimize and NMaximize to numerically solve constrained optimization problems:

Integrate a function over the solution set of inequalities:

Use Median, Quantile, and Quartiles to the ^(th) greatest number(s):

Possible Issues  (3)

Inequalities for machine-precision approximate numbers can be subtle:

The strict inequality is based on extra digits:

Arbitrary-precision approximate numbers do not have this problem:

Thanks to automatic precision tracking, Less knows to look only at the first 10 digits:

In this case, inequality between machine numbers gives the expected result:

The extra digits in this case are ignored by Less:

Wolfram Research (1988), Less, Wolfram Language function, https://reference.wolfram.com/language/ref/Less.html (updated 1996).

Text

Wolfram Research (1988), Less, Wolfram Language function, https://reference.wolfram.com/language/ref/Less.html (updated 1996).

CMS

Wolfram Language. 1988. "Less." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 1996. https://reference.wolfram.com/language/ref/Less.html.

APA

Wolfram Language. (1988). Less. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Less.html

BibTeX

@misc{reference.wolfram_2024_less, author="Wolfram Research", title="{Less}", year="1996", howpublished="\url{https://reference.wolfram.com/language/ref/Less.html}", note=[Accessed: 22-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_less, organization={Wolfram Research}, title={Less}, year={1996}, url={https://reference.wolfram.com/language/ref/Less.html}, note=[Accessed: 22-November-2024 ]}