12/19/2023 0 Comments Less than or equal to copy pasteJavaScript has the same semantics for =, referred to as "equality without type coercion". For instance, the expression 0 = false is true, but 0 = false is not, because the number 0 is an integer value whereas false is a Boolean value. In PHP, the triple equal sign, =, denotes value and type equality, meaning that not only do the two expressions evaluate to equal values, but they are also of the same data type. The equal sign is also used in defining attribute–value pairs, in which an attribute is assigned a value. Some languages additionally feature the " spaceship operator", or three-way comparison operator,, to determine whether one value is less than, equal to, or greater than another. The language B introduced the use of = with this meaning, which has been copied by its descendant C and most later languages where = means assignment. Following ALGOL, most languages that use = for equality use := for assignment, although APL, with its special character set, uses a left-pointing arrow.įortran did not have an equality operator (it was only possible to compare an expression to zero, using the arithmetic IF statement) until FORTRAN IV was released in 1962, since when it has used the four characters. However, in most languages where = has one of these meanings, a different character or, more often, a sequence of characters is used for the other meaning. But = is used for equality and not assignment in the Pascal family, Ada, Eiffel, APL, and other languages.Ī few languages, such as BASIC and PL/I, have used the equal sign to mean both assignment and equality, distinguished by context. As well as Fortran, = is used for assignment in such languages as C, Perl, Python, awk, and their descendants. The equal sign was reserved for this usage.īoth usages have remained common in different programming languages into the early 21st century. ALGOL included a relational operator that tested for equality, allowing constructions like if x = 2 with essentially the same meaning of = as the conditional usage in mathematics. For example, the assignment X = X + 2 increases the value of X by 2.Ī rival programming-language usage was pioneered by the original version of ALGOL, which was designed in 1958 and implemented in 1960. This somewhat resembles the use of = in a mathematical definition, but with different semantics: the expression following = is evaluated first, and may refer to a previous value of X. In Fortran, = serves as an assignment operator: X = 2 sets the value of X to 2. The first important computer programming language to use the equal sign was the original version of Fortran, FORTRAN I, designed in 1954 and implemented in 1957. "), or to express a universal equivalence (" ( x + 1) 2 = x 2 + 2 x + 1"). In mathematics, the equal sign can be used as a simple statement of fact in a specific case (" x = 2"), or to create definitions (" let x = 2"), conditional statements (" if x = 2, then. Usage in mathematics and computer programming The symbol || was used by some and æ (or œ), from the Latin word aequalis meaning equal, was widely used into the 1700s" ( History of Mathematics, University of St Andrews). "The symbol = was not immediately popular. And to avoid the tedious repetition of these words: "is equal to" I will set as I do often in work use, a pair of parallels, or duplicate lines of one length, thus: =, because no 2 things can be more equal. In his book Recorde explains his design of the "Gemowe lines" (meaning twin lines, from the Latin gemellus) Īnd to auoide the tediouſe repetition of theſe woordes : is equalle to : I will ſette as I doe often in woorke vſe, a paire of paralleles, or Gemowe lines of one lengthe, thus: =, bicauſe noe. The original form of the symbol was much wider than the present form. The = symbol, now universally accepted in mathematics for equality, was first recorded by Welsh mathematician Robert Recorde in The Whetstone of Witte (1557). From The Whetstone of Witte (1557) by Robert Recorde. The first use of an equal sign, equivalent to 14 x+15=71 in modern notation. The etymology of the word "equal" is from the Latin word " æqualis", as meaning "uniform", "identical", or "equal", from aequus ("level", "even", or "just"). It was invented in 1557 by Robert Recorde. In Unicode and ASCII, it has the code point U+003D. 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 equals sign ( British English) or equal sign ( American English), also known as the equality sign, is the mathematical symbol =, which is used to indicate equality in some well-defined sense. A well-known equality featuring the equal sign
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |