Greater-than sign
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.[1] 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. HistoryThe earliest known use of the symbols < and > is found in Artis Analyticae Praxis ad Aequationes Algebraicas Resolvendas (The Analytical Arts Applied to Solving Algebraic Equations) by Thomas Harriot, published posthumously in 1631.[1] The text states "Signum majoritatis ut a > b significet a majorem quam b (The sign of majority a > b indicates that a is greater than b)" and "Signum minoritatis ut a < b significet a minorem quam 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,[1] in both backwards and forwards forms.[2] Johnson says it is likely Harriot developed the two symbols from this symbol.[2] Usage in text markupAngle bracketsThe greater-than sign is sometimes used for an approximation of the closing angle bracket, ⟩. The proper Unicode character is U+232A 〉 RIGHT-POINTING ANGLE BRACKET. ASCII does not have angular brackets. HTMLIn HTML (and SGML and XML), the greater-than sign is used at the end of tags. The greater-than sign may be included with E-mail and MarkdownIn some early e-mail systems, the greater-than sign was used to denote quotations.[3] The sign is also used to denote quotations in Markdown.[4] Usage in programmingThe 'greater-than sign' > is encoded in ASCII as character hex 3E, decimal 62. The Unicode code point is U+003E > GREATER-THAN SIGN, inherited from ASCII. For use with HTML, the mnemonics Programming languageBASIC and C-family languages (including Java[5] and C++) use the comparison operator 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, C, and C++, the operator In Haskell, the In XPath the Triple greater-than sign>>> is the unsigned-right-shift operator in JavaScript. 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)
[GCC 10.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> print("Hello World")
Hello World
>>>
Greater-than sign with equals sign
In BASIC, Lisp-family languages, Lua and C-family languages (including Java and C++) the operator In Fortran, the operator In Bourne shell and Windows PowerShell, the operator Hyphen-minus with greater-than sign
Shell scriptsIn Bourne shell (and many other shells), greater-than sign is used to redirect output to a file. Greater-than plus ampersand ( Spaceship operatorGreater-than sign is used in the 'spaceship operator', ECMAScript and C#In ECMAScript 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<int, int> square = x => x * x;
Console.WriteLine(square(5)); // 25
PHPIn 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 $x = 5;
$y = 3;
$z = 5;
echo $x <> $y; // true
echo $x <> $z; // false
UnicodeUnicode provides various greater than symbols:[7] (use ⇕ controls to change sort order temporarily)
See also
References
|