The tilde () or , is a
grapheme
In linguistics, a grapheme is the smallest functional unit of a writing system.
The word ''grapheme'' is derived and the suffix ''-eme'' by analogy with ''phoneme'' and other names of emic units. The study of graphemes is called '' graphemi ...
with several uses. The name of the character came into English from
Spanish, which in turn came from the
Latin
Latin (, or , ) is a classical language belonging to the Italic languages, Italic branch of the Indo-European languages. Latin was originally a dialect spoken in the lower Tiber area (then known as Latium) around present-day Rome, but through ...
''
titulus'', meaning "title" or "superscription". Its primary use is as a
diacritic
A diacritic (also diacritical mark, diacritical point, diacritical sign, or accent) is a glyph added to a letter or to a basic glyph. The term derives from the Ancient Greek (, "distinguishing"), from (, "to distinguish"). The word ''diacrit ...
(accent) in combination with a base letter; but for historical reasons, it is also used in standalone form within a variety of contexts.
History
Use by medieval scribes
The tilde was originally written over an omitted letter or several letters as a
scribal abbreviation, or "mark of suspension" and "mark of contraction", shown as a straight line when used with capitals. Thus, the commonly used words ''
Anno Domini
The terms (AD) and before Christ (BC) are used to label or number years in the Julian and Gregorian calendars. The term is Medieval Latin and means 'in the year of the Lord', but is often presented using "our Lord" instead of "the Lord" ...
'' were frequently abbreviated to ''A
o Dñi'', with an elevated terminal with a suspension mark placed over the "n". Such a mark could denote the omission of one letter or several letters. This saved on the expense of the scribe's labor and the cost of vellum and ink. Medieval European charters written in Latin are largely made up of such abbreviated words with suspension marks and other abbreviations; only uncommon words were given in full.
The text of the
Domesday Book
Domesday Book () – the Middle English spelling of "Doomsday Book" – is a manuscript record of the "Great Survey" of much of England and parts of Wales completed in 1086 by order of King William I, known as William the Conqueror. The manusc ...
of 1086, relating for example, to the
manor of Molland in
Devon
Devon ( , historically known as Devonshire , ) is a ceremonial and non-metropolitan county in South West England. The most populous settlement in Devon is the city of Plymouth, followed by Devon's county town, the city of Exeter. Devo ...
(see adjacent picture), is highly
abbreviated as indicated by numerous tildes.
The text with abbreviations expanded is as follows:
Role of mechanical typewriters
On
typewriters designed for languages that routinely use
diacritic
A diacritic (also diacritical mark, diacritical point, diacritical sign, or accent) is a glyph added to a letter or to a basic glyph. The term derives from the Ancient Greek (, "distinguishing"), from (, "to distinguish"). The word ''diacrit ...
s (accent marks), there are two possible solutions. Keys can be dedicated to
precomposed characters or alternatively a
dead key mechanism can be provided. With the latter, a mark is made when a dead key is typed, but unlike normal keys, the paper carriage does not move on and thus the next letter to be typed is printed under that accent. Typewriters for
Spanish typically have a dedicated key for
Ñ/ñ but, as
Portuguese uses
Ã/ã and
Õ/õ, a single dead-key (rather than take two keys to dedicate) is the most practical solution.
The tilde symbol did not exist independently as a
movable type
Movable type (US English; moveable type in British English) is the system and technology of printing and typography that uses movable components to reproduce the elements of a document (usually individual alphanumeric characters or punctuation m ...
or
hot-lead printing character since the
type case
A type case is a compartmentalized wooden box used to store movable type used in letterpress printing.Williams, Fred (1992). "Origin of the California Job Case". ''Type & Press'', fall 1992. http://www.apa-letterpress.com/T%20&%20P%20ARTICLES/ ...
s for Spanish or Portuguese would include
sorts for the accented forms.
The centralized ASCII tilde
The first ASCII standard (X3.64-1963) did not have a tilde.
Like Portuguese and Spanish, the French, German and Scandinavian languages also needed symbols in excess of the basic 26 needed for English. The
ASA worked with and through the
CCITT
The ITU Telecommunication Standardization Sector (ITU-T) is one of the three sectors (divisions or units) of the International Telecommunication Union (ITU). It is responsible for coordinating standards for telecommunications and Information Comm ...
to internationalize the code-set, to meet the basic needs of at least the Western European languages.
Thus ISO646 was born (and the ASCII standard updated to X3.64-1967), providing the tilde and other symbols as optional characters.
ISO646 and ASCII incorporated many of the overprinting lower-case diacritics from typewriters, including tilde. Overprinting was intended to work by putting a
backspace code between the codes for letter and diacritic. However even at that time, mechanisms that could do this or any other overprinting were not widely available, did not work for capital letters, and were impossible on video displays, with the result that this concept failed to gain significant acceptance. Consequently, many of these free-standing diacritics (and the
underscore
An underscore, ; also called an underline, low line, or low dash; is a line drawn under a segment of text. In proofreading, underscoring is a convention that says "set this text in italic type", traditionally used on manuscript or typescript ...
) were quickly reused by software as additional syntax, basically becoming new types of syntactic symbols that a programming language could use. As this usage became predominant,
type design
Type design is the art and process of designing typefaces. This involves drawing each letterform using a consistent style. The basic concepts and design variables are described below.
A typeface differs from other modes of graphic production su ...
gradually evolved so these diacritic characters became larger and more vertically centered, making them useless as overprinted diacritics but much easier to read as free-standing characters that had come to be used for entirely different and novel purposes. Most modern fonts align the plain ASCII "
spacing" (free-standing) tilde at the same level as
dash
The dash is a punctuation mark consisting of a long horizontal line. It is similar in appearance to the hyphen but is longer and sometimes higher from the baseline. The most common versions are the endash , generally longer than the hyphen ...
es, or only slightly higher.
The free-standing tilde is at code 126 in ASCII, where it was inherited into Unicode as U+007E.
A similar shaped mark () is known in typography and
lexicography
Lexicography is the study of lexicons, and is divided into two separate academic disciplines. It is the art of compiling dictionaries.
* Practical lexicography is the art or craft of compiling, writing and editing dictionaries.
* Theoreti ...
as a
swung dash
The dash is a punctuation mark consisting of a long horizontal line. It is similar in appearance to the hyphen but is longer and sometimes higher from the baseline. The most common versions are the endash , generally longer than the hyphen b ...
: these are used in dictionaries to indicate the omission of the entry word.
Connection to Spanish
As indicated by the etymological origin of the word "tilde" in English, this symbol has been closely associated with the
Spanish language
Spanish ( or , Castilian) is a Romance language of the Indo-European language family that evolved from colloquial Latin spoken on the Iberian peninsula. Today, it is a global language with more than 500 million native speakers, mainly in the ...
. The connection stems from the use of the tilde above the letter to form the (different) letter in Spanish, a feature shared by only
a few other languages, most of which are historically connected to Spanish. This peculiarity can help non-native speakers quickly identify a text as being written in Spanish with little chance of error. In addition, most native speakers, although
not all, use the word to refer to their language. Particularly during the 1990s, Spanish-speaking intellectuals and news outlets demonstrated support for the language and the culture by defending this letter against
globalisation and
computer
A computer is a machine that can be programmed to carry out sequences of arithmetic or logical operations ( computation) automatically. Modern digital electronic computers can perform generic sets of operations known as programs. These prog ...
isation trends that threatened to remove it from keyboards and other standardised products and codes. The
Instituto Cervantes, founded by
Spain's government to promote the Spanish language internationally, chose as its logo a highly stylised with a large tilde. The 24-hour news channel
CNN in the US later adopted a similar strategy on its existing logo for the launch of its
Spanish-language version. And similarly to the
National Basketball Association
The National Basketball Association (NBA) is a professional basketball sports league, league in North America. The league is composed of 30 teams (29 in the United States and 1 in Canada) and is one of the major professional sports leagues i ...
(NBA), the
Spain men's national basketball team is nicknamed "ÑBA".
In Spanish itself the word is used more generally for diacritics, including the stress-marking acute accent. The diacritic is more commonly called or , and is not considered an accent mark in Spanish, but rather simply a part of the letter (much like
the dot over makes an character that is familiar to readers of English).
Usage
Letters with tilde
This is a table of
precomposed letters with tilde:
A tilde diacritic can be added to almost any character by using a
combining tilde.
Common use in English
The
English language
English is a West Germanic language of the Indo-European language family, with its earliest forms spoken by the inhabitants of early medieval England. It is named after the Angles, one of the ancient Germanic peoples that migrated to the ...
does not use the tilde as a diacritic, though it is used in some
loanword
A loanword (also loan word or loan-word) is a word at least partly assimilated from one language (the donor language) into another language. This is in contrast to cognates, which are words in two or more languages that are similar because ...
s. The standalone form of the symbol is used more widely. Informally,
it means
"approximately", "about", or "around", such as "~30 minutes before", meaning "''approximately'' 30 minutes before".
It may also mean "similar to",
including "of the same
order of magnitude
An order of magnitude is an approximation of the logarithm of a value relative to some contextually understood reference value, usually 10, interpreted as the base of the logarithm and the representative of values of magnitude one. Logarithmic di ...
as",
such as "" meaning that and are of the same order of magnitude. Another approximation symbol is the
double tilde , meaning "approximately/almost equal to".
The tilde is also used to indicate
congruence of shapes by placing it over an symbol, thus .
In more recent digital usage, tildes on either side of a word or phrase have sometimes come to convey a particular tone that "let
the enclosed words perform both sincerity and irony", which can pre-emptively defuse a negative reaction.
For example,
BuzzFeed journalist Joseph Bernstein interprets the tildes in the following
tweet:
:"in the ~ spirit of the season ~ will now link to some of the (imho) #Bestof2014 sports reads. if you hate nice things, mute that hashtag."
as a way of making it clear that both the author and reader are aware that the enclosed phrase – "spirit of the season" – "is cliche and we know this quality is beneath our author, and we don't want you to think our author is a cliche person generally".
Diacritical use
In some languages, the tilde is a
diacritic
A diacritic (also diacritical mark, diacritical point, diacritical sign, or accent) is a glyph added to a letter or to a basic glyph. The term derives from the Ancient Greek (, "distinguishing"), from (, "to distinguish"). The word ''diacrit ...
mark placed over a
letter to indicate a change in its pronunciation:
Pitch
The tilde was firstly used in the
polytonic orthography of
Ancient Greek
Ancient Greek includes the forms of the Greek language used in ancient Greece and the ancient world from around 1500 BC to 300 BC. It is often roughly divided into the following periods: Mycenaean Greek (), Dark Ages (), the Archaic pe ...
, as a variant of the
circumflex
The circumflex () is a diacritic in the Latin and Greek scripts that is also used in the written forms of many languages and in various romanization and transcription schemes. It received its English name from la, circumflexus "bent around" ...
, representing a rise in
pitch followed by a return to standard pitch.
Abbreviation
Later, it was used to make
abbreviations in medieval
Latin
Latin (, or , ) is a classical language belonging to the Italic languages, Italic branch of the Indo-European languages. Latin was originally a dialect spoken in the lower Tiber area (then known as Latium) around present-day Rome, but through ...
documents. When an or followed a vowel, it was often omitted, and a tilde (physically, a small ) was placed over the preceding vowel to indicate the missing letter; this is the origin of the use of tilde to indicate nasalization (compare
the development of the umlaut as an abbreviation of .) The practice of using the tilde over a vowel to indicate omission of an or continued in printed books in
French
French (french: français(e), link=no) may refer to:
* Something of, from, or related to France
** French language, which originated in France, and its various dialects and accents
** French people, a nation and ethnic group identified with Franc ...
as a means of reducing text length until the 17th century. It was also used in
Portuguese and
Spanish.
The tilde was also used occasionally to make other abbreviations, such as over the letter , making ,
to signify the word ''que'' ("that").
Nasalization
It is also as a small that the tilde originated when written above other letters, marking a
Latin
Latin (, or , ) is a classical language belonging to the Italic languages, Italic branch of the Indo-European languages. Latin was originally a dialect spoken in the lower Tiber area (then known as Latium) around present-day Rome, but through ...
which had been
elided in old Galician-Portuguese. In modern
Portuguese it indicates
nasalization
In phonetics, nasalization (or nasalisation) is the production of a sound while the velum is lowered, so that some air escapes through the nose during the production of the sound by the mouth. An archetypal nasal sound is .
In the Internation ...
of the base vowel: "hand", from Lat. ''manu-''; "reasons", from Lat. . This usage has been adopted in the orthographies of several
native languages of South America, such as
Guarani and
Nheengatu, as well as in the
International Phonetic Alphabet
The International Phonetic Alphabet (IPA) is an alphabetic system of phonetic notation based primarily on the Latin script. It was devised by the International Phonetic Association in the late 19th century as a standardized representation ...
(IPA) and many other phonetic alphabets. For example, is the IPA transcription of the pronunciation of the French place-name ''
Lyon
Lyon,, ; Occitan: ''Lion'', hist. ''Lionés'' also spelled in English as Lyons, is the third-largest city and second-largest metropolitan area of France. It is located at the confluence of the rivers Rhône and Saône, to the northwest of ...
''.
In
Breton, the symbol after a vowel means that the letter serves only to give the vowel a nasalised pronunciation, without being itself pronounced, as it normally is. For example, gives the pronunciation whereas gives .
In the
DMG romanization of
Tunisian Arabic
Tunisian Arabic, or simply Tunisian, is a set of dialects of Maghrebi Arabic spoken in Tunisia. It is known among its over 11 million speakers aeb, translit=Tounsi/Tounsiy, label=as, تونسي , "Tunisian" or "Everyday Language" to distin ...
, the tilde is used for nasal vowels õ and ṏ.
Palatal n
The tilded (, ) developed from the digraph in Spanish. In this language, is considered a separate letter called ''
eñe'' (), rather than a letter-diacritic combination; it is placed in Spanish dictionaries between the letters and . In Spanish, the word ''tilde'' actually refers to diacritics in general, e.g. the acute accent in ''José'', while the diacritic in is called "virgulilla" (). Current languages in which the tilded () is used for the
palatal nasal consonant include
*
Asturian
*
Aymara
*
Basque
*
Chamorro Chamorro may refer to:
* Chamorro people, the indigenous people of the Mariana Islands in the Western Pacific
* Chamorro language, an Austronesian language indigenous to The Marianas
* Chamorro Time Zone, the time zone of Guam and the Northern Mari ...
*
Filipino
*
Galician
*
Guaraní
*
Iñupiaq
*
Mapudungun
*
Papiamento
*
Quechua
*
Spanish
*
Tetum
*
Wolof
Tone
In
Vietnamese, a tilde over a vowel represents a creaky rising
tone (''ngã''). Letters with the tilde are not considered separate letters of the
Vietnamese alphabet.
International Phonetic Alphabet
In
phonetics
Phonetics is a branch of linguistics that studies how humans produce and perceive sounds, or in the case of sign languages, the equivalent aspects of sign. Linguists who specialize in studying the physical properties of speech are phoneticians. ...
, a tilde is used as a
diacritic that is placed above a letter, below it or
superimposed onto the middle of it:
* A tilde above a letter indicates
nasalization
In phonetics, nasalization (or nasalisation) is the production of a sound while the velum is lowered, so that some air escapes through the nose during the production of the sound by the mouth. An archetypal nasal sound is .
In the Internation ...
, e.g. .
* A tilde superimposed onto the middle of a letter indicates
velarization or
pharyngealization
Pharyngealization is a secondary articulation of consonants or vowels by which the pharynx or epiglottis is constricted during the articulation of the sound.
IPA symbols
In the International Phonetic Alphabet, pharyngealization can be indicated b ...
, e.g. . If no precomposed
Unicode
Unicode, formally The Unicode Standard,The formal version reference is is an information technology standard for the consistent encoding, representation, and handling of text expressed in most of the world's writing systems. The standard, ...
character exists, the Unicode character can be used to generate one.
* A tilde below a letter indicates
laryngealisation
In linguistics, creaky voice (sometimes called laryngealisation, pulse phonation, vocal fry, or glottal fry) refers to a low, scratchy sound that occupies the vocal range below the common vocal register. It is a special kind of phonation in which t ...
, e.g. . If no precomposed Unicode character exists, the Unicode character can be used to generate one.
Letter extension
In
Estonian
Estonian may refer to:
* Something of, from, or related to Estonia, a country in the Baltic region in northern Europe
* Estonians, people from Estonia, or of Estonian descent
* Estonian language
* Estonian cuisine
* Estonian culture
See also
*
...
, the symbol stands for the
close-mid back unrounded vowel, and it is considered an independent letter.
Other uses
Some languages and alphabets use the tilde for other purposes, such as:
*
Arabic script
The Arabic script is the writing system used for Arabic and several other languages of Asia and Africa. It is the second-most widely used writing system in the world by number of countries using it or a script directly derived from it, and th ...
: A symbol resembling the tilde () is used over the letter () to become
, denoting a long sound.
*
Guaraní: The tilded (note that with tilde is not available as a precomposed glyph in
Unicode
Unicode, formally The Unicode Standard,The formal version reference is is an information technology standard for the consistent encoding, representation, and handling of text expressed in most of the world's writing systems. The standard, ...
) stands for the
velar nasal consonant. Also, the tilded () stands for the nasalized upper central rounded vowel .
Munduruku, Parintintín, and two older spellings of Filipino words also use .
*
Syriac script: A tilde (~) under the letter ''
Kaph
Kaph (also spelled kaf) is the eleventh letter of the Semitic abjads, including Phoenician kāp , Hebrew kāf , Aramaic kāp , Syriac kāp̄ , and Arabic kāf (in abjadi order).
The Phoenician letter gave rise to the Greek kappa (Κ), ...
'' represents a sound, transliterated as ''ch'' or ''č''.
*
Estonian
Estonian may refer to:
* Something of, from, or related to Estonia, a country in the Baltic region in northern Europe
* Estonians, people from Estonia, or of Estonian descent
* Estonian language
* Estonian cuisine
* Estonian culture
See also
*
...
and
Võro use the tilde above the letter o (õ) to indicate the vowel , a rare sound among languages.
*
Unicode
Unicode, formally The Unicode Standard,The formal version reference is is an information technology standard for the consistent encoding, representation, and handling of text expressed in most of the world's writing systems. The standard, ...
has a
combining vertical tilde character: . It is used to indicate
middle tone in linguistic transcription of certain dialects of the
Lithuanian language
Lithuanian ( ) is an Eastern Baltic language belonging to the Baltic branch of the Indo-European language family. It is the official language of Lithuania and one of the official languages of the European Union. There are about 2.8 mill ...
.
Punctuation
The tilde is used in various ways in punctuation, such as:
Range
In some languages (though not generally in English), a tilde-like wavy dash may be used as
punctuation
Punctuation (or sometimes interpunction) is the use of spacing, conventional signs (called punctuation marks), and certain typographical devices as aids to the understanding and correct reading of written text, whether read silently or aloud. A ...
(instead of an unspaced
hyphen
The hyphen is a punctuation mark used to join words and to separate syllables of a single word. The use of hyphens is called hyphenation. ''Son-in-law'' is an example of a hyphenated word. The hyphen is sometimes confused with dashes ( figure ...
,
en dash
The dash is a punctuation mark consisting of a long horizontal line. It is similar in appearance to the hyphen but is longer and sometimes higher from the baseline. The most common versions are the endash , generally longer than the hyphen b ...
or
em dash) between two
number
A number is a mathematical object used to count, measure, and label. The original examples are the natural numbers 1, 2, 3, 4, and so forth. Numbers can be represented in language with number words. More universally, individual number ...
s, to indicate a
range rather than
subtraction or a hyphenated number (such as a part number or model number). For example, "12~15" means "12 to 15", "~3" means "up to three", and "100~" means "100 and greater".
East Asian languages almost always use this convention, but it is often done for clarity in some other languages as well.
Chinese uses the wavy dash and full-width em dash interchangeably for this purpose. In English, the tilde is often used to express ranges and model numbers in
electronics
The field of electronics is a branch of physics and electrical engineering that deals with the emission, behaviour and effects of electrons using electronic devices. Electronics uses active devices to control electron flow by amplification ...
, but rarely in formal grammar or in type-set documents, as a wavy dash preceding a number sometimes represents an approximation (see below).
Approximation
Before a number the tilde can mean 'approximately'; '~42' means 'approximately 42'. When used with
currency symbol
A currency symbol or currency sign is a graphic symbol used to denote a currency unit. Usually it is defined by the monetary authority, like the national central bank for the currency concerned.
In formatting, the symbol can use various forma ...
s that precede the number (national conventions differ), the tilde precedes the symbol, thus for example '~$10' means 'about ten dollars'.
The symbols
≈ (almost equal to) and
≅ (approximately equal to) are among the other
symbols used to express approximation.
Japanese
The is used for various purposes in Japanese, including to denote ranges of numbers (e.g.,
''5〜10'' means between 5 and 10) in place of dashes or brackets, and to indicate origin. The wave dash is also used to separate a title and a subtitle in the same line, as a
colon is used in English.
When used in conversations via email or instant messenger it may be used as a
sarcasm mark.
The sign is used as a replacement for the , katakana character, in Japanese, extending the final syllable.
=Unicode and Shift JIS encoding of wave dash
=
In practice the (Unicode ), is often used instead of the (Unicode ), because the
Shift JIS code for the wave dash, 0x8160, which should be mapped to U+301C, is instead mapped to U+FF5E in
Windows code page 932 (
Microsoft
Microsoft Corporation is an American multinational technology corporation producing computer software, consumer electronics, personal computers, and related services headquartered at the Microsoft Redmond campus located in Redmond, Washi ...
's
code page for Japanese), a widely used extension of Shift JIS.
This decision avoided a shape definition error in the original (6.2) Unicode code charts:
[.] the wave dash reference glyph in JIS / Shift JIS
matches the Unicode reference glyph for U+FF5E , while the original reference glyph for U+301C
was reflected, incorrectly,
when Unicode imported the JIS wave dash. In other platforms such as the
classic Mac OS and
macOS
macOS (; previously OS X and originally Mac OS X) is a Unix operating system developed and marketed by Apple Inc. since 2001. It is the primary operating system for Apple's Mac computers. Within the market of desktop and la ...
, 0x8160 is correctly mapped to U+301C. It is generally difficult, if not impossible, for users of Japanese Windows to type U+301C, especially in legacy, non-Unicode applications.
A similar situation exists regarding the Korean
KS X 1001
KS X 1001, "''Code for Information Interchange (Hangul and Hanja)''", formerly called KS C 5601, is a South Korean coded character set standard to represent hangul and hanja characters on a computer.
KS X 1001 is encoded by the most common l ...
character set, in which Microsoft maps the
EUC-KR
Extended Unix Code (EUC) is a multibyte character encoding system used primarily for Japanese, Korean, and simplified Chinese.
The most commonly used EUC codes are variable-length encodings with a character belonging to an compliant coded chara ...
or
UHC code for the wave dash (0xA1AD) to ,
while
IBM and
Apple
An apple is an edible fruit produced by an apple tree (''Malus domestica''). Apple trees are cultivated worldwide and are the most widely grown species in the genus '' Malus''. The tree originated in Central Asia, where its wild ancest ...
map it to U+301C.
Microsoft also uses U+FF5E to map the KS X 1001 raised tilde (0xA2A6),
while Apple uses .
The current Unicode reference glyph for U+301C has been corrected
to match the JIS standard in response to a 2014 proposal, which noted that while the existing Unicode reference glyph had been matched by fonts from the discontinued
Windows XP
Windows XP is a major release of Microsoft's Windows NT operating system. It was release to manufacturing, released to manufacturing on August 24, 2001, and later to retail on October 25, 2001. It is a direct upgrade to its predecessors, Wind ...
, all other major platforms including later versions of Microsoft Windows shipped with fonts matching the JIS reference glyph for U+301C.
The JIS / Shift JIS wave dash is still formally mapped to U+301C as of
JIS X 0213, whereas the
WHATWG Encoding Standard used by
HTML5 follows Microsoft in mapping 0x8160 to U+FF5E. These two code points have a similar or identical glyph in several fonts, reducing the confusion and incompatibility.
Mathematics
As a unary operator
A tilde in front of a single quantity can mean "approximately", "about"
or "of the same
order of magnitude
An order of magnitude is an approximation of the logarithm of a value relative to some contextually understood reference value, usually 10, interpreted as the base of the logarithm and the representative of values of magnitude one. Logarithmic di ...
as."
In written
mathematical logic
Mathematical logic is the study of formal logic within mathematics. Major subareas include model theory, proof theory, set theory, and recursion theory. Research in mathematical logic commonly addresses the mathematical properties of forma ...
, the tilde represents
negation: "~''p''" means "not ''p''", where "''p''" is a
proposition
In logic and linguistics, a proposition is the meaning of a declarative sentence. In philosophy, " meaning" is understood to be a non-linguistic entity which is shared by all sentences with the same meaning. Equivalently, a proposition is the no ...
. Modern use often replaces the tilde with the negation symbol (¬) for this purpose, to avoid confusion with
equivalence relations.
As a relational operator
In
mathematics
Mathematics is an area of knowledge that includes the topics of numbers, formulas and related structures, shapes and the spaces in which they are contained, and quantities and their changes. These topics are represented in modern mathematics ...
, the tilde operator (Unicode U+223C), sometimes called "twiddle", is often used to denote an
equivalence relation between two objects. Thus "" means " is
equivalent to ". It is a weaker statement than stating that
equals . The expression "" is sometimes read aloud as " twiddles ", perhaps as an analogue to the verbal expression of "".
The tilde can indicate approximate equality in a variety of ways. It can be used to denote the
asymptotic equality of two functions. For example, means that
.
A tilde is also used to indicate "
approximately equal to" (e.g. 1.902 ~= 2). This usage probably developed as a typed alternative to the
libra symbol used for the same purpose in written mathematics, which is an equal sign with the upper bar replaced by a bar with an upward hump, bump, or loop in the middle (︍︍♎︎) or, sometimes, a tilde (≃). The symbol "≈" is also used for this purpose.
In
physics
Physics is the natural science that studies matter, its fundamental constituents, its motion and behavior through space and time, and the related entities of energy and force. "Physical science is that department of knowledge which ...
and
astronomy
Astronomy () is a natural science that studies celestial objects and phenomena. It uses mathematics, physics, and chemistry in order to explain their origin and evolution. Objects of interest include planets, moons, stars, nebulae, g ...
, a tilde can be used between two expressions (e.g. ) to state that the two are of the same
order of magnitude
An order of magnitude is an approximation of the logarithm of a value relative to some contextually understood reference value, usually 10, interpreted as the base of the logarithm and the representative of values of magnitude one. Logarithmic di ...
.
In
statistics
Statistics (from German: '' Statistik'', "description of a state, a country") is the discipline that concerns the collection, organization, analysis, interpretation, and presentation of data. In applying statistics to a scientific, indust ...
and
probability theory
Probability theory is the branch of mathematics concerned with probability. Although there are several different probability interpretations, probability theory treats the concept in a rigorous mathematical manner by expressing it through a set ...
, the tilde means "is distributed as";
see
random variable(e.g. X ~ B(n,p) for a binomial distribution).
A tilde can also be used to represent geometric
similarity (e.g. , meaning
triangle
A triangle is a polygon with three edges and three vertices. It is one of the basic shapes in geometry. A triangle with vertices ''A'', ''B'', and ''C'' is denoted \triangle ABC.
In Euclidean geometry, any three points, when non- colline ...
is similar to ). A triple tilde (≋) is often used to show
congruence, an equivalence relation in geometry.
In
graph theory
In mathematics, graph theory is the study of '' graphs'', which are mathematical structures used to model pairwise relations between objects. A graph in this context is made up of '' vertices'' (also called ''nodes'' or ''points'') which are conn ...
, the tilde can be used to represent adjacency between vertices. The edge
connects vertices
and
which can be said to be adjacent, and this adjacency can be denoted
.
As a diacritic
The symbol "
" is pronounced as "eff tilde" or, informally, as "eff twiddle" or, in American English, "eff wiggle". This can be used to denote the
Fourier transform
A Fourier transform (FT) is a mathematical transform that decomposes functions into frequency components, which are represented by the output of the transform as a function of frequency. Most commonly functions of time or space are transformed ...
of ''f'', or a
lift of ''f'', and can have a variety of other meanings depending on the context.
A tilde placed below a letter in mathematics can represent a
vector quantity (e.g.
).
In
statistics
Statistics (from German: '' Statistik'', "description of a state, a country") is the discipline that concerns the collection, organization, analysis, interpretation, and presentation of data. In applying statistics to a scientific, indust ...
and
probability theory
Probability theory is the branch of mathematics concerned with probability. Although there are several different probability interpretations, probability theory treats the concept in a rigorous mathematical manner by expressing it through a set ...
, a tilde placed on top of a variable is sometimes used to represent the
median
In statistics and probability theory, the median is the value separating the higher half from the lower half of a data sample, a population, or a probability distribution. For a data set, it may be thought of as "the middle" value. The basic f ...
of that variable; thus
would indicate the median of the variable
. A tilde over the letter n (
) is sometimes used to indicate the
harmonic mean.
In machine learning, a tilde may represent a candidate value for a cell state in
GRUs or
LSTM units. (e.g. c̃)
Physics
Often in physics, one can consider an equilibrium solution to an equation, and then a perturbation to that equilibrium. For the variables in the original equation (for instance
) a substitution
can be made, where
is the equilibrium part and
is the perturbed part.
A tilde is also used in
particle physics
Particle physics or high energy physics is the study of fundamental particles and forces that constitute matter and radiation. The fundamental particles in the universe are classified in the Standard Model as fermions (matter particles) an ...
to denote the hypothetical
supersymmetric partner. For example, an
electron
The electron ( or ) is a subatomic particle with a negative one elementary electric charge. Electrons belong to the first generation of the lepton particle family,
and are generally thought to be elementary particles because they have n ...
is referred to by the letter ''e'', and its
superpartner the
selectron is written ''ẽ''.
Economics
For relations involving preference,
economist
An economist is a professional and practitioner in the social sciences, social science discipline of economics.
The individual may also study, develop, and apply theories and concepts from economics and write about economic policy. Within this ...
s sometimes use the tilde to represent
indifference between two or more bundles of goods. For example, to say that a consumer is indifferent between bundles ''x'' and ''y'', an economist would write ''x'' ~ ''y''.
Electronics
It can approximate the sine wave symbol (∿,
U+223F), which is used in
electronics
The field of electronics is a branch of physics and electrical engineering that deals with the emission, behaviour and effects of electrons using electronic devices. Electronics uses active devices to control electron flow by amplification ...
to indicate
alternating current
Alternating current (AC) is an electric current which periodically reverses direction and changes its magnitude continuously with time in contrast to direct current (DC) which flows only in one direction. Alternating current is the form in whic ...
, in place of +, −, or ⎓ for
direct current
Direct current (DC) is one-directional flow of electric charge. An electrochemical cell is a prime example of DC power. Direct current may flow through a conductor such as a wire, but can also flow through semiconductors, insulators, or ev ...
.
Linguistics
The tilde may indicate alternating
allomorphs or
morphological alternation, as in for ''kneel~knelt'' (the
plus sign '+' indicates a morpheme boundary).
The tilde may represent some sort of phonetic or phonemic variation between two sounds, which might be
allophone
In phonology, an allophone (; from the Greek , , 'other' and , , 'voice, sound') is a set of multiple possible spoken soundsor ''phones''or signs used to pronounce a single phoneme in a particular language. For example, in English, (as in '' ...
s or in
free variation. For example, can represent "either or ".
In
formal semantics, it is also used as a notation for the ''
squiggle operator
In formal semantics, the squiggle operator \sim is an operator which constrains the occurrence of focus. On one common definition, the squiggle operator takes a syntactic argument \alpha and a discourse salient argument C and introduces a presuppo ...
'' which plays a key role in many theories of
focus.
Computing
Computer programmers use the tilde in various ways and sometimes call the symbol (as opposed to the diacritic) a squiggle, squiggly, swiggle, or twiddle. According to the
Jargon File, other synonyms sometimes used in programming include not, approx, wiggle, enyay (after ''
eñe'') and (humorously) sqiggle .
Directories and URLs
On
Unix
Unix (; trademarked as UNIX) is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, ...
-like
operating system
An operating system (OS) is system software that manages computer hardware, software resources, and provides common daemon (computing), services for computer programs.
Time-sharing operating systems scheduler (computing), schedule tasks for ef ...
s (including
AIX
Aix or AIX may refer to:
Computing
* AIX, a line of IBM computer operating systems
*An Alternate Index, for a Virtual Storage Access Method Key Sequenced Data Set
* Athens Internet Exchange, a European Internet exchange point
Places Belgiu ...
,
BSD,
Linux
Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, whi ...
and
macOS
macOS (; previously OS X and originally Mac OS X) is a Unix operating system developed and marketed by Apple Inc. since 2001. It is the primary operating system for Apple's Mac computers. Within the market of desktop and la ...
), tilde normally indicates the current user's
home directory
A home directory is a file system directory on a multi-user operating system containing files for a given user of the system. The specifics of the home directory (such as its name and location) are defined by the operating system involved; for ...
. For example, if the current user's home directory is , then the command is equivalent to , , or . This convention derives from the
Lear-Siegler ADM-3A terminal in common use during the 1970s, which happened to have the tilde symbol and the word "Home" (for moving the cursor to the upper left) on the same key. When prepended to a particular username, the tilde indicates that user's home directory (e.g., for the home directory of user , such as ).
Used in
URLs
A Uniform Resource Locator (URL), colloquially termed as a web address, is a reference to a web resource that specifies its location on a computer network and a mechanism for retrieving it. A URL is a specific type of Uniform Resource Identi ...
on the
World Wide Web
The World Wide Web (WWW), commonly known as the Web, is an information system enabling documents and other web resources to be accessed over the Internet.
Documents and downloadable media are made available to the network through web ...
, it often denotes a personal website on a
Unix
Unix (; trademarked as UNIX) is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, ...
-based server. For example, might be the personal website of John Doe. This mimics the Unix shell usage of the tilde. However, when accessed from the web, file access is usually directed to a
subdirectory
In computing, a directory is a file system cataloging structure which contains references to other computer files, and possibly other directories. On many computers, directories are known as folders, or drawers, analogous to a workbench or the ...
in the user's home directory, such as or .
In URLs, the characters (or ) may substitute for a tilde if an input device lacks a tilde key. Thus, and will behave in the same manner.
Computer languages
The tilde is used in the
AWK programming language
A programming language is a system of notation for writing computer programs. Most programming languages are text-based formal languages, but they may also be graphical. They are a kind of computer language.
The description of a programming ...
as part of the pattern match operators for
regular expressions:
*
''variable'' ~ /''regex''/
returns true if the variable is matched.
*
''variable'' !~ /''regex''/
returns false if the variable is matched.
A variant of this, with the plain tilde replaced with
=~
, was adopted in
Perl
Perl is a family of two high-level, general-purpose, interpreted, dynamic programming languages. "Perl" refers to Perl 5, but from 2000 to 2019 it also referred to its redesigned "sister language", Perl 6, before the latter's name was offic ...
, and this semi-standardization has led to the use of these operators in other programming languages, such as
Ruby
A ruby is a pinkish red to blood-red colored gemstone, a variety of the mineral corundum ( aluminium oxide). Ruby is one of the most popular traditional jewelry gems and is very durable. Other varieties of gem-quality corundum are called ...
or the
SQL variant of the database
PostgreSQL
PostgreSQL (, ), also known as Postgres, is a free and open-source relational database management system (RDBMS) emphasizing extensibility and SQL compliance. It was originally named POSTGRES, referring to its origins as a successor to the ...
.
In
APL and
MATLAB
MATLAB (an abbreviation of "MATrix LABoratory") is a proprietary multi-paradigm programming language and numeric computing environment developed by MathWorks. MATLAB allows matrix manipulations, plotting of functions and data, implementat ...
, tilde represents the monadic logical function NOT, and in APL it additionally represents the dyadic
multiset function ''without'' (
set difference).
In
C the tilde character is used as
bitwise NOT unary
operator, following the notation in logic (an
!
causes a logical NOT, instead). This is also used by most languages based on or influenced by C, such as
C++,
D and
C#. The
MySQL database also use tilde as bitwise invert as does Microsoft's SQL Server
Transact-SQL (T-SQL) language.
JavaScript
JavaScript (), often abbreviated as JS, is a programming language that is one of the core technologies of the World Wide Web, alongside HTML and CSS. As of 2022, 98% of websites use JavaScript on the client side for webpage behavior, of ...
also uses tilde as bitwise NOT, and because JavaScript internally uses floats and the bitwise complement only works on integers, numbers are stripped of their decimal part before applying the operation. This has also given rise to using two tildes
~~x
as a short syntax for a cast to integer (numbers are stripped of their decimal part and changed into their complement, and then back).
In C++ and C#, the tilde is also used as the first character in a
class
Class or The Class may refer to:
Common uses not otherwise categorized
* Class (biology), a taxonomic rank
* Class (knowledge representation), a collection of individuals or objects
* Class (philosophy), an analytical concept used differently ...
's
method name (where the rest of the name must be the same name as the class) to indicate a
destructor – a special method which is called at the end of the
object's life.
In ASP.NET application tilde ('~') is used as a shortcut to the root of the application's virtual directory.
In the
CSS
Cascading Style Sheets (CSS) is a style sheet language used for describing the presentation of a document written in a markup language such as HTML or XML (including XML dialects such as SVG, MathML or XHTML). CSS is a cornerstone technolo ...
stylesheet language, the tilde is used for the indirect adjacent combinator as part of a selector.
In the
D programming language, the tilde is used as an
array concatenation
In formal language theory and computer programming, string concatenation is the operation of joining character strings end-to-end. For example, the concatenation of "snow" and "ball" is "snowball". In certain formalisations of concatenat ...
operator, as well as to indicate an object destructor and bitwise not operator. Tilde operator can be overloaded for user types, and binary tilde operator is mostly used to merging two objects, or adding some objects to set of objects. It was introduced because plus operator can have different meaning in many situations. For example, what to do with "120" + "14" ? Is this a string "134" (addition of two numbers), or "12014" (concatenation of strings) or something else? D disallows + operator for arrays (and strings), and provides separate operator for concatenation (similarly
PHP programming language solved this problem by using dot operator for concatenation, and + for number addition, which will also work on strings containing numbers).
In
Eiffel, the tilde is used for object comparison. If ''a'' and ''b'' denote objects, the boolean expression ''a'' ~ ''b'' has value true if and only if these objects are equal, as defined by the applicable version of the library routine ''is_equal'', which by default denotes field-by-field object equality but can be redefined in any class to support a specific notion of equality. If ''a'' and ''b'' are references, the object equality expression ''a'' ~ ''b'' is to be contrasted with ''a'' = ''b'' which denotes reference equality. Unlike the call ''a''.''is_equal'' (''b''), the expression ''a'' ~ ''b'' is
type-safe even in the presence of
covariance
In probability theory and statistics, covariance is a measure of the joint variability of two random variables. If the greater values of one variable mainly correspond with the greater values of the other variable, and the same holds for the le ...
.
In the
Apache Groovy programming language the tilde character is used as an operator mapped to the bitwiseNegate() method. Given a String the method will produce a java.util.regex.Pattern. Given an integer it will negate the integer bitwise like in C.
=~
and
~
can in Groovy be used to match a regular expression.
In
Haskell, the tilde is used in type constraints to indicate type equality. Also, in pattern-matching, the tilde is used to indicate a lazy pattern match.
In the
Inform
Inform is a programming language and design system for interactive fiction originally created in 1993 by Graham Nelson. Inform can generate programs designed for the Z-code or Glulx virtual machines. Versions 1 through 5 were released betwe ...
programming language, the tilde is used to indicate a quotation mark inside a quoted string.
In "text mode" of the
LaTeX
Latex is an emulsion (stable dispersion) of polymer microparticles in water. Latexes are found in nature, but synthetic latexes are common as well.
In nature, latex is found as a milky fluid found in 10% of all flowering plants (angiosperms ...
typesetting language a tilde diacritic can be obtained using, e.g.,
\~
, yielding "ñ". A stand-alone tilde can be obtained by using
\textasciitilde
or
\string~
.
In "math mode" a tilde diacritic can be written as, e.g.,
\tilde
. For a wider tilde
\widetilde
can be used. The
\sim
command produce a tilde-like binary relation symbol that is often used in mathematical expressions, and the double-tilde
≈ is obtained with
\approx
. The
url
package also supports entering tildes directly, e.g.,
\url
.
In both text and math mode, a tilde on its own (
~
) renders a white space with no line breaking.
In
MediaWiki
MediaWiki is a free and open-source wiki software. It is used on Wikipedia and almost all other Wikimedia websites, including Wiktionary, Wikimedia Commons and Wikidata; these sites define a large part of the requirement set for Media ...
syntax
In linguistics, syntax () is the study of how words and morphemes combine to form larger units such as phrases and sentences. Central concerns of syntax include word order, grammatical relations, hierarchical sentence structure ( constituenc ...
, four tildes are used as a shortcut for a user's signature.
In
Common Lisp, the tilde is used as the prefix for format specifiers in format strings.
In
Max/MSP, a tilde is used to denote objects that process at the computer's sampling rate, i.e. mainly those that deal with sound.
In
Standard ML, the tilde is used as the prefix for negative numbers and as the unary negation operator.
In
OCaml, the tilde is used to specify the label for a labeled parameter.
In
R, the tilde operator is used to separate the left- and right-hand sides in a model formula.
In
Object REXX, the twiddle is used as a "message send" symbol. For example,
Employee.name~lower()
would cause the
lower()
method to act on the object
Employee
's
name
attribute, returning the result of the operation.
~~
returns the object that received the method rather than the result produced. Thus it can be used when the result need not be returned or when cascading methods are to be used.
team~~insert("Jane")~~insert("Joe")~~insert("Steve")
would send multiple concurrent
insert
messages, thus invoking the
insert
method three consecutive times on the
team
object.
In
Raku, is used instead of for a
regular expression.
Keyboards
The presence (or absence) of a tilde engraved on the keyboard depends on the territory where it was sold. In either case, computer's system settings determine the
keyboard mapping
A keyboard layout is any specific physical, visual or functional arrangement of the keys, legends, or key-meaning associations (respectively) of a computer keyboard, mobile phone, or other computer-controlled typographic keyboard.
is the actua ...
and the default setting will match the engravings on the keys. Even so, it certainly possible to configure a keyboard for a different locale than that supplied by the retailer. On American and British keyboards, the tilde is a standard keytop and pressing it produces a free-standing "ASCII Tilde". To generate a letter with a tilde diacritic requires the
US international or
UK extended keyboard setting.
* With US-international, the `/~ key is a
dead key: pressing the key then a letter produces the tilde-accented form of that letter. (For example, produces .) With this setting active, an ASCII tilde can be inserted with the dead key followed by the space bar, or alternatively by striking the dead key twice in a row.
* With UK-extended, the key works normally but becomes a 'dead key' when combined with
AltGr
AltGr (also Alt Graph) is a modifier key found on many computer keyboards (rather than a second Alt key found on US keyboards). It is primarily used to type characters that are not widely used in the territory where sold, such as foreign cur ...
. Thus then a letter produces the accented form of that letter.
* With a
Macintosh
The Mac (known as Macintosh until 1999) is a family of personal computers designed and marketed by Apple Inc., Apple Inc. Macs are known for their ease of use and minimalist designs, and are popular among students, creative professionals, and ...
either of the Alt/
Option keys function similarly.
* With
Linux
Linux ( or ) is a family of open-source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically packaged as a Linux distribution, whi ...
, the
compose key facility is used.
Instructions for other national languages and keyboards are beyond the scope of this article.
In the US and European
Windows
Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for se ...
systems, the
Alt code for a single tilde is
126
.
Backup filenames
The dominant
Unix
Unix (; trademarked as UNIX) is a family of multitasking, multiuser computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, ...
convention for naming backup copies of files is appending a tilde to the original file name.
It originated with the
Emacs
Emacs , originally named EMACS (an acronym for "Editor MACroS"), is a family of text editors that are characterized by their extensibility. The manual for the most widely used variant, GNU Emacs, describes it as "the extensible, customizable, ...
text editor and was adopted by many other editors and some command-line tools.
Emacs also introduced an elaborate numbered backup scheme, with files named , and so on. It didn't catch on, as the rise of
version control software eliminates the need for this usage.
Microsoft filenames
The tilde was part of
Microsoft
Microsoft Corporation is an American multinational technology corporation producing computer software, consumer electronics, personal computers, and related services headquartered at the Microsoft Redmond campus located in Redmond, Washi ...
's
filename mangling
The process of filename mangling, in computing, involves a translation of the file name for compatibility at the operating system level. It occurs when a filename on a filesystem appears in a form incompatible with the operating system accessi ...
scheme when it extended the
FAT file system standard to support long filenames for
Microsoft Windows
Windows is a group of several proprietary graphical operating system families developed and marketed by Microsoft. Each family caters to a certain sector of the computing industry. For example, Windows NT for consumers, Windows Server for ...
. Programs written prior to this development could only access filenames in the so-called
8.3 format—the filenames consisted of a maximum of eight characters from a restricted character set (e.g. no spaces), followed by a period, followed by three more characters. In order to permit these legacy programs to access files in the FAT file system, each file had to be given two names—one long, more descriptive one, and one that conformed to the 8.3 format. This was accomplished with a name-mangling scheme in which the first six characters of the filename are followed by a tilde and a digit. For example, "" might become "".
The tilde symbol is also often used to prefix hidden temporary files that are created when a document is opened in Windows. For example, when a document "Document1.doc" is opened in Word, a file called "~$cument1.doc" is created in the same directory. This file contains information about which user has the file open, to prevent multiple users from attempting to change a document at the same time.
Juggling notation
In the
juggling notation system Beatmap, tilde can be added to either "hand" in a pair of fields to say "cross the arms with this hand on top".
Mills Mess
In toss juggling, Mills' Mess is a popular juggling pattern, typically performed with three balls although the props used and the number of objects can be different. The pattern was invented by and named after Steve Mills. It is a well-known tr ...
is thus represented as (~2x,1)(1,2x)(2x,~1)*.
Unicode
Variants and similars
Unicode has code-points for many forms of non-combined tilde, for symbols incorporating tildes, and for characters visually similar to a tilde.
Precomposed characters
A number of characters in Unicode, have tilde
precomposed.
See also
*
Circumflex
The circumflex () is a diacritic in the Latin and Greek scripts that is also used in the written forms of many languages and in various romanization and transcription schemes. It received its English name from la, circumflexus "bent around" ...
**
Caret (computing)
*
Tittle
*
Double tilde (disambiguation)
Notes
References
{{navbox punctuation
Latin-script diacritics
Punctuation
Typographical symbols
Greek-script diacritics
Logic symbols
Mathematical symbols
*