HOME

TheInfoList



OR:

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 and . The less-than sign and greater-than sign always "point" to the smaller number. Since the development of computer
programming language A programming language is a system of notation for writing computer programs. Programming languages are described in terms of their Syntax (programming languages), syntax (form) and semantics (computer science), semantics (meaning), usually def ...
s, the greater-than sign and the less-than sign have been repurposed for a range of uses and operations.


History

The earliest known use of the symbols and is found in (''The Analytical Arts Applied to Solving Algebraic Equations'') by Thomas Harriot, published posthumously in 1631. The text states " a > b a b (The sign of majority a > b indicates that a is greater than b)" and " a < b a b (The sign of minority a < b indicates that a is less than b)." According to historian Art Johnson, while Harriot was surveying North America, he saw a Native American with a symbol that resembled the greater-than sign, in both backwards and forwards forms. Johnson, Art. "History of Mathematical Symbols". Classic Math: History Topics for the Classroom. Dale Seymour Publications, 1994. Johnson says it is likely Harriot developed the two symbols from this symbol.


Usage in text markup


Angle brackets

The greater-than sign is sometimes used for an approximation of the closing angle bracket, . The proper Unicode character is . ASCII does not have angular brackets.


HTML

In
HTML Hypertext Markup Language (HTML) is the standard markup language for documents designed to be displayed in a web browser. It defines the content and structure of web content. It is often assisted by technologies such as Cascading Style Sheets ( ...
(and
SGML The Standard Generalized Markup Language (SGML; International Organization for Standardization, ISO 8879:1986) is a standard for defining generalized markup languages for documents. ISO 8879 Annex A.1 states that generalized markup is "based on t ...
and XML), the greater-than sign is used at the end of tags. The greater-than sign may be included with , while produces the greater-than or equal to sign.


E-mail and Markdown

In some early e-mail systems, the greater-than sign was used to denote
quotation A quotation or quote is the repetition of a sentence, phrase, or passage from speech or text that someone has said or written. In oral speech, it is the representation of an utterance (i.e. of something that a speaker actually said) that is intro ...
s. The sign is also used to denote quotations in Markdown.


Usage in programming

The 'greater-than sign' is encoded in
ASCII ASCII ( ), an acronym for American Standard Code for Information Interchange, is a character encoding standard for representing a particular set of 95 (English language focused) printable character, printable and 33 control character, control c ...
as character hex 3E, decimal 62. The
Unicode Unicode or ''The Unicode Standard'' or TUS is a character encoding standard maintained by the Unicode Consortium designed to support the use of text in all of the world's writing systems that can be digitized. Version 16.0 defines 154,998 Char ...
code point A code point, codepoint or code position is a particular position in a Table (database), table, where the position has been assigned a meaning. The table may be one dimensional (a column), two dimensional (like cells in a spreadsheet), three dime ...
is , inherited from ASCII. For use with
HTML Hypertext Markup Language (HTML) is the standard markup language for documents designed to be displayed in a web browser. It defines the content and structure of web content. It is often assisted by technologies such as Cascading Style Sheets ( ...
, the mnemonics or may also be used.


Programming language

BASIC Basic or BASIC may refer to: Science and technology * BASIC, a computer programming language * Basic (chemistry), having the properties of a base * Basic access authentication, in HTTP Entertainment * Basic (film), ''Basic'' (film), a 2003 film ...
and C-family languages (including
Java Java is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea (a part of Pacific Ocean) to the north. With a population of 156.9 million people (including Madura) in mid 2024, proje ...
and C++) use the comparison operator to mean "greater than". In Lisp-family languages, is a function used to mean "greater than". In Coldfusion and Fortran, operator means "greater than".


Double greater-than sign

is used for an approximation of the '' much-greater-than sign'' . ASCII does not have the much greater-than sign. The double greater-than sign is also used for an approximation of the closing guillemet, . In
Java Java is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea (a part of Pacific Ocean) to the north. With a population of 156.9 million people (including Madura) in mid 2024, proje ...
, C, and C++, the operator is the right-shift operator. In C++ it is also used to get input from a
stream A stream is a continuous body of water, body of surface water Current (stream), flowing within the stream bed, bed and bank (geography), banks of a channel (geography), channel. Depending on its location or certain characteristics, a strea ...
, similar to the C functions and . In Haskell, the function is a monadic operator. It is used for sequentially composing two actions, discarding any value produced by the first. In that regard, it is like the statement sequencing operator in imperative languages, such as the semicolon in C. In XPath the operator returns true if the left operand follows the right operand in document order; otherwise it returns false.


Triple greater-than sign

is the unsigned-right-shift operator in
JavaScript JavaScript (), often abbreviated as JS, is a programming language and core technology of the World Wide Web, alongside HTML and CSS. Ninety-nine percent of websites use JavaScript on the client side for webpage behavior. Web browsers have ...
. Three greater-than signs form the distinctive prompt of the firmware console in MicroVAX, VAXstation, and DEC Alpha computers (known as the SRM console in the latter). This is also the default prompt of the Python interactive shell, often seen for code examples that can be executed interactively in the interpreter: $ python Python 3.9.2 (default, Feb 20 2021, 18:40:11) CC 10.2.0on linux Type "help", "copyright", "credits" or "license" for more information. >>> print("Hello World") Hello World >>>


Greater-than sign with equals sign

is sometimes used for an approximation of the greater than or equal to sign, which was not included in the ASCII repertoire. The sign is, however, provided in
Unicode Unicode or ''The Unicode Standard'' or TUS is a character encoding standard maintained by the Unicode Consortium designed to support the use of text in all of the world's writing systems that can be digitized. Version 16.0 defines 154,998 Char ...
, as . In
BASIC Basic or BASIC may refer to: Science and technology * BASIC, a computer programming language * Basic (chemistry), having the properties of a base * Basic access authentication, in HTTP Entertainment * Basic (film), ''Basic'' (film), a 2003 film ...
, Lisp-family languages, Lua and C-family languages (including
Java Java is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea (a part of Pacific Ocean) to the north. With a population of 156.9 million people (including Madura) in mid 2024, proje ...
and C++) the operator means "greater than or equal to". In Sinclair BASIC it is encoded as a single-byte code point token. In Fortran, the operator means "greater than or equal to". In Bourne shell and Windows PowerShell, the operator means "greater than or equal to".


Hyphen-minus with greater-than sign

is used in some programming languages (for example F#) to create an arrow. Arrows like these could also be used in text where other arrow symbols are unavailable. In the R programming language, this can be used as the right assignment operator. In the C, C++, and PHP, this is used as a member access operator. In Swift and Python, it is used to indicate the return value type when defining a function (i.e., ).


Shell scripts

In Bourne shell (and many other shells), greater-than sign is used to redirect output to a file. Greater-than plus ampersand () is used to redirect to a file descriptor.


Spaceship operator

Greater-than sign is used in the ' spaceship operator', .


ECMAScript and C#

In
ECMAScript ECMAScript (; ES) is a standard for scripting languages, including JavaScript, JScript, and ActionScript. It is best known as a JavaScript standard intended to ensure the interoperability of web pages across different web browsers. It is stan ...
and C#, the greater-than sign is used in lambda function expressions. In ECMAScript: const square = x => x * x; console.log(square(5)); // 25 In C#: Func square = x => x * x; Console.WriteLine(square(5)); // 25


PHP

In PHP, the greater-than sign is used in conjunction with the less-than sign as a not equal to operator. It is the same as the != operator. $x = 5; $y = 3; $z = 5; echo $x <> $y; // true echo $x <> $z; // false


Unicode

Unicode Unicode or ''The Unicode Standard'' or TUS is a character encoding standard maintained by the Unicode Consortium designed to support the use of text in all of the world's writing systems that can be digitized. Version 16.0 defines 154,998 Char ...
provides various greater than symbols: (use ⇕ controls to change sort order temporarily)


See also

*
Inequality (mathematics) In mathematics, an inequality is a relation which makes a non-equal comparison between two numbers or other mathematical expressions. It is used most often to compare two numbers on the number line by their size. The main types of inequality ar ...
* Less-than sign * Relational operator * Mathematical operators and symbols in Unicode * Guillemet *
Material conditional The material conditional (also known as material implication) is a binary operation commonly used in logic. When the conditional symbol \to is interpreted as material implication, a formula P \to Q is true unless P is true and Q is false. M ...


References

{{Reflist Typographical symbols Mathematical symbols Inequalities (mathematics)