Less-than sign

Last updated
<
Less-than sign
In  Unicode U+003C<LESS-THAN SIGN (&lt;, &LT;)
Different from
Different fromU+2329 LEFT-POINTING ANGLE BRACKET
Related
See alsoU+003E> GREATER-THAN SIGN
U+2264LESS-THAN OR EQUAL TO

U+2A7DLESS-THAN OR SLANTED EQUAL TO used e.g. in Poland

Contents

U+226ENOT LESS-THAN
U+226AMUCH LESS-THAN

The less-than sign is a mathematical symbol that denotes an inequality between two values. The widely adopted form of two equal-length strokes connecting in an acute angle at the left, <, has been found in documents dated as far back as the 1560s. In mathematical writing, the less-than sign is typically placed between two values being compared and signifies that the first number is less than the second number. Examples of typical usage include 12 < 1 and −2 < 0.

Since the development of computer programming languages, the less-than sign and the greater-than sign have been repurposed for a range of uses and operations.

Computing

The less-than sign, <, is an original ASCII character (hex 3C, decimal 60).

Programming

In BASIC, Lisp-family languages, and C-family languages (including Java and C++), comparison operator < means "less than".

In Coldfusion, operator .lt. means "less than".

In Fortran, operator .LT. means "less than"; later versions allow <.

Shell scripts

In Bourne shell (and many other shells), operator -lt means "less than". Less-than sign is used to redirect input from a file. Less-than plus ampersand (<&) is used to redirect from a file descriptor.

Double less-than sign

The double less-than sign, <<, may be used for an approximation of the much-less-than sign () or of the opening guillemet («). ASCII does not encode either of these signs, though they are both included in Unicode.

In Bash, Perl, and Ruby, operator <<EOF (where "EOF" is an arbitrary string, but commonly "EOF" denoting "end of file") is used to denote the beginning of a here document.

In C and C++, operator << represents a binary left shift.

In the C++ Standard Library, operator <<, when applied on an output stream, acts as insertion operator and performs an output operation on the stream.

In Ruby, operator << acts as append operator when used between an array and the value to be appended.

In XPath the << operator returns true if the left operand precedes the right operand in document order; otherwise it returns false. [1]

Triple less-than sign

In PHP, operator <<<OUTPUT is used to denote the beginning of a heredoc statement (where OUTPUT is an arbitrary named variable.)

In Bash, <<<word is used as a "here string", where word is expanded and supplied to the command on its standard input, similar to a heredoc.

Less-than sign with equals sign

The less-than sign with the equals sign, <=, may be used for an approximation of the less-than-or-equal-to sign, . ASCII does not have a less-than-or-equal-to sign, but Unicode defines it at code point U+2264.

In BASIC, Lisp-family languages, and C-family languages (including Java and C++), operator <= means "less than or equal to". In Sinclair BASIC it is encoded as a single-byte code point token.

In Prolog, =< means "less than or equal to" (as distinct from the arrow <=).

In Fortran, operators .LE. and <= both mean "less than or equal to".

In Bourne shell and Windows PowerShell, the operator -le means "less than or equal to".

Less-than sign with hyphen-minus

In the R programming language, the less-than sign is used in conjunction with a hyphen-minus to create an arrow (<-), this can be used as the left assignment operator.

Spaceship operator

Less-than sign is used in the spaceship operator.

HTML

In HTML (and SGML and XML), the less-than sign is used at the beginning of tags. The less-than sign may be included with &lt;. The less-than-or-equal-to sign, , may be included with &le;.

Unicode

Unicode provides various Less Than Symbol: [2]

SymbolNameCode Point
Apl Functional Symbol Quad Less ThanU+2343
Circled Less ThanU+29C0
Double Right Arc Less Than BracketU+2996
Fullwidth less thanU+FF1C
Equal To Or Less ThanU+22DC
Left Arc Less Than BracketU+2993
Leftwards Arrow Through Less ThanU+2977
Less Than Above Leftwards ArrowU+2976
Less Than But Not Equal ToU+2268
Less Than But Not Equivalent ToU+22E6
Less Than Or Equal ToU+2264
Less Than Or Equivalent ToU+2272
Less Than Over Equal ToU+2266
<Less Than SignU+003C
Less Than With Circle InsideU+2A79
Less Than With DotU+22D6
Much Less ThanU+226A
Neither Less Than Nor Equal ToU+2270
Neither Less Than Nor Equivalent ToU+2274
Not Less ThanU+226E
Small Less Than SignU+FE64
Very Much Less ThanU+22D8

The less-than sign may be seen for an approximation of the opening angle bracket, . True angle bracket characters, as required in linguistics notation, are expected in formal texts.

Mathematics

In an inequality, the less-than sign and greater-than sign always "point" to the smaller number. Put another way, the "jaws" (the wider section of the symbol) always direct to the larger number.

The less-than-sign is sometimes used to represent a total order, partial order or preorder. However, the symbol is often used when it would be confusing or not convenient to use <. In mathematical writing using LaTeX, the TeX command is \prec. The Unicode code point is U+227APRECEDES.

See also

Related Research Articles

In mathematics and computing, the hexadecimal numeral system is a positional numeral system that represents numbers using a radix (base) of sixteen. Unlike the decimal system representing numbers using ten symbols, hexadecimal uses sixteen distinct symbols, most often the symbols "0"–"9" to represent values 0 to 9, and "A"–"F" to represent values from ten to fifteen.

<span class="mw-page-title-main">Logical conjunction</span> Logical connective AND

In logic, mathematics and linguistics, and is the truth-functional operator of conjunction or logical conjunction. The logical connective of this operator is typically represented as or or (prefix) or or in which is the most modern and widely used.

A bracket is either of two tall fore- or back-facing punctuation marks commonly used to isolate a segment of text or data from its surroundings. They come in four main pairs of shapes, as given in the box to the right, which also gives their names, that vary between British and American English. "Brackets", without further qualification, are in British English the () marks and in American English the [] marks.

A mathematical symbol is a figure or a combination of figures that is used to represent a mathematical object, an action on mathematical objects, a relation between mathematical objects, or for structuring the other symbols that occur in a formula. As formulas are entirely constituted with symbols of various types, many symbols are needed for expressing all mathematics.

The tilde˜ or ~, is a grapheme with a number of uses. The name of the character came into English from Spanish, which in turn came from the Latin titulus, meaning 'title' or 'superscription'. Its primary use is as a diacritic (accent) in combination with a base letter; but, for historical reasons, it is also used in standalone form within a variety of contexts.

The plus sign and the minus sign are mathematical symbols used to denote positive and negative functions, respectively. In addition, + represents the operation of addition, which results in a sum, while represents subtraction, resulting in a difference. Their use has been extended to many other meanings, more or less analogous. Plus and minus are Latin terms meaning "more" and "less", respectively.

The multiplication sign, also known as the times sign or the dimension sign, is a mathematical symbol used to denote the operation of multiplication, which results in a product. While similar to a lowercase X, the form is properly a four-fold rotationally symmetric saltire.

In computer programming, an assignment statement sets and/or re-sets the value stored in the storage location(s) denoted by a variable name; in other words, it copies a value into the variable. In most imperative programming languages, the assignment statement is a fundamental construct.

The equals sign or equal sign, also known as the equality sign, is the mathematical symbol =, which is used to indicate equality in some well-defined sense. In an equation, it is placed between two expressions that have the same value, or for which one studies the conditions under which they have the same value.

The backtick` is a typographical mark used mainly in computing. It is also known as backquote, grave, or grave accent.

The vertical bar, |, is a glyph with various uses in mathematics, computing, and typography. It has many names, often related to particular meanings: Sheffer stroke, pipe, bar, or, vbar, and others.

In computer science, the Boolean is a data type that has one of two possible values which is intended to represent the two truth values of logic and Boolean algebra. It is named after George Boole, who first defined an algebraic system of logic in the mid 19th century. The Boolean data type is primarily associated with conditional statements, which allow different actions by changing control flow depending on whether a programmer-specified Boolean condition evaluates to true or false. It is a special case of a more general logical data type—logic does not always need to be Boolean.

In computer science, a relational operator is a programming language construct or operator that tests or defines some kind of relation between two entities. These include numerical equality and inequalities.

In computing, a here document is a file literal or input stream literal: it is a section of a source code file that is treated as if it were a separate file. The term is also used for a form of multiline string literals that use similar syntax, preserving line breaks and other whitespace in the text.

Fortress is a discontinued experimental programming language for high-performance computing, created by Sun Microsystems with funding from DARPA's High Productivity Computing Systems project. One of the language designers was Guy L. Steele Jr., whose previous work includes Scheme, Common Lisp, and Java.

In computer data, a substitute character (␚) is a control character that is used to pad transmitted data in order to send it in blocks of fixed size, or to stand in place of a character that is recognized to be invalid, erroneous or unrepresentable on a given device. It is also used as an escape sequence in some programming languages.

The programming language APL is distinctive in being symbolic rather than lexical: its primitives are denoted by symbols, not words. These symbols were originally devised as a mathematical notation to describe algorithms. APL programmers often assign informal names when discussing functions and operators but the core functions and operators provided by the language are denoted by non-textual symbols.

The greater-than sign is a mathematical symbol that denotes an inequality between two values. The widely adopted form of two equal-length strokes connecting in an acute angle at the right, >, has been found in documents dated as far back as 1631. In mathematical writing, the greater-than sign is typically placed between two values being compared and signifies that the first number is greater than the second number. Examples of typical usage include 1.5 > 1 and 1 > −2. The less-than sign and greater-than sign always "point" to the smaller number. Since the development of computer programming languages, the greater-than sign and the less-than sign have been repurposed for a range of uses and operations.

In 1979, Honeywell Information Systems announced a new programming language for their time-sharing service named TEX, an acronym for the Text Executive text processing system. TEX was a first-generation scripting language developed around the time of AWK and used by Honeywell initially as an in-house system test automation tool.

Caret is the name used familiarly for the character ^ provided on most QWERTY keyboards by typing ⇧ Shift+6. The symbol has a variety of uses in programming and mathematics. The name "caret" arose from its visual similarity to the original proofreader's caret, a mark used in proofreading to indicate where a punctuation mark, word, or phrase should be inserted into a document. The formal ASCII standard (X3.64.1977) calls it a "circumflex".

References

  1. "XML Path Language (XPath) 2.0 (Second Edition)". www.w3.org. W3C. 14 December 2010. Archived from the original on 7 October 2022. Retrieved 29 October 2019.
  2. "Less than symbol". Archived from the original on 2023-05-16. Retrieved 2023-06-06.