Tilde
Tilde
Main page

Tilde

logo
Community Hub0 subscribers
Read side by side
from Wikipedia

~ ◌̃
Tilde (symbol)
Combining tilde (diacritic)
In UnicodeU+007E ~ TILDE
U+0303 ◌̃ COMBINING TILDE

The tilde (/ˈtɪldə/, also /ˈtɪld, -di, -d/)[1] is a grapheme ˜ or ~ with a number of uses. The name of the character came into English from Spanish tilde, which, in turn, came from the Latin titulus, meaning 'title' or 'superscription'.[2] Its primary use is as a diacritic (accent) in combination with a base letter. Its freestanding form is used in modern texts mainly to indicate approximation.

History

[edit]

Use by medieval scribes

[edit]

The tilde was originally one of a variety of marks written over an omitted letter or several letters as a scribal abbreviation (a "mark of contraction").[3] Thus, the commonly used words Anno Domini were frequently abbreviated to Ao Dñi, with an elevated terminal with a contraction 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 contraction marks and other abbreviations; only uncommon words were given in full.

The text of the Domesday Book of 1086, relating for example, to the manor of Molland in Devon (see adjacent picture), is highly abbreviated as indicated by numerous tildes.

Text of Exeter Domesday Book of 1086

The text with abbreviations expanded is as follows:

Mollande tempore regis Eduardi geldabat pro quattuor hidis et uno ferling. Terra est quadraginta carucae. In dominio sunt tres carucae et decem servi et triginta villani et viginti bordarii cum sedecim carucis. Ibi duodecim acrae prati et quindecim acrae silvae. Pastura tres leugae in longitudine et latitudine. Reddit quattuor et viginti libras ad pensam. Huic manerio est adjuncta Blachepole. Elwardus tenebat tempore regis Edwardi pro manerio et geldabat pro dimidia hida. Terra est duae carucae. Ibi sunt quinque villani cum uno servo. Valet viginti solidos ad pensam et arsuram. Eidem manerio est injuste adjuncta Nimete et valet quindecim solidos. Ipsi manerio pertinet tercius denarius de Hundredis Nortmoltone et Badentone et Brantone et tercium animal pasturae morarum.

Translation: In the time of King Edward Mollande gelded for four hides and one ferling. The land is forty carucates. In the domain there are three barons and ten serfs and thirty peasants and twenty bordars with sixteen barons. There are twelve acres of meadow and fifteen acres of wood. A pasture three leagues in length and breadth. It should weigh four and twenty pounds. Blachepole is attached to this manor. Elward held it in the time of King Edward for a manor and gelded for half a hide. The earth is two carucas. There are five peasants with one servant. It is worth twenty shillings for weighing and burning. The same manor is unjustly attached to Nimes and is worth fifteen shillings. To the manor belongs a third of the penny of the Hundred of Nortmolton and Badenton and Branton, and a third of the cattle of the pasture.

Role of mechanical typewriters

[edit]
An Olivetti Lettera 32 typewriter (Portuguese Model) with tilde (and circumflex) dead-key beside Ç
Spanish typewriter (QWERTY keyboard) with dead keys for acute, circumflex, diaeresis and grave accents. Ñ/ñ is present as a precomposed character only.

On typewriters designed for languages that routinely use diacritics (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 or hot-lead printing character since the type cases for Spanish or Portuguese would include sorts for the accented forms.

The centralized ASCII tilde

[edit]
Serif: —~—
Sans-serif: —~—
Monospace: —~—
A free-standing tilde between two em dashes
in three font families

The first ASCII standard (X3.64-1963) did not have a tilde.[4]: 246  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 to internationalize the code-set, to meet the basic needs of at least the Western European languages.

It appears to have been at their May 13–15, 1963 meeting that the CCITT decided that the proposed ISO 7-bit code standard would be suitable for their needs if a lower case alphabet and five diacritical marks [...] were added to it.[5] At the October 29–31 meeting, then, the ISO subcommittee altered the ISO draft to meet the CCITT requirements, replacing the up-arrow and left-arrow with diacriticals, adding diacritical meanings to the apostrophe and quotation mark, and making the number sign a dual[a] for the tilde.[6]

— Yucca's free information site (which cites the original sources).[7]

Thus ISO 646 was born (and the ASCII standard updated to X3.64-1967), providing the tilde and other symbols as optional characters.[4]: 247 [b]

ISO 646 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.[8] 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) 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 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 dashes, 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 as a swung dash: these are used in dictionaries to indicate the omission of the entry word.[9]

Connection to Spanish

[edit]
Logo of the Instituto Cervantes
Logo of CNN en Español

As indicated by the etymological origin of the word "tilde" in English, this symbol has been closely associated with the Spanish language. The connection stems from the use of the tilde above the letter ⟨n⟩ 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. 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 computerisation trends that threatened to remove it from keyboards and other standardised products and codes.[10][11] 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, therefore being written as CN͠N. And similarly to the National Basketball Association (NBA), the Spain men's national basketball team is nicknamed "ÑBA".

In Spanish itself the word tilde is used more generally for diacritics, including the stress-marking acute accent.[12] The diacritic ~ is more commonly called virgulilla or la tilde de la eñe, and is not considered an accent mark in Spanish, but rather simply a part of the letter ñ (much like the dot over ı makes an i character that is familiar to readers of English).

Usage

[edit]

Common use in English

[edit]

The English language does not use the tilde as a diacritic, though it is used in some loanwords. The standalone form of the symbol is used more widely. Informally,[13] it means "approximately", "about", or "around", such as "~30 minutes before", meaning "approximately 30 minutes before".[14][15] It may also mean "similar to",[16] including "of the same order of magnitude as",[13] such as "x ~ y" meaning that x and y are of the same order of magnitude. Another approximation symbol is the double tilde , meaning "approximately/almost equal to".[14][16][17] 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[s] the enclosed words perform both sincerity and irony", which can pre-emptively defuse a negative reaction.[18] 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".[18][c]

Among other uses, the symbol has been used on social media to indicate sarcasm.[19] It may also be used online, especially in informal writing such as fanfiction, to convey a cutesy, playful, or flirtatious tone.[20]

Diacritical use

[edit]

In some languages, the tilde is a diacritic mark placed over a letter to indicate a change in its pronunciation:

Pitch

[edit]

The tilde was firstly used in the polytonic orthography of Ancient Greek, as a variant of the circumflex, representing a rise in pitch followed by a return to standard pitch.[21]

Abbreviation

[edit]
Carta marina showing Finnish economy, with the captions Hic fabricantur naves and Hic fabricantur bombarde abbreviated

Later, it was used to make abbreviations in medieval Latin documents. When an ⟨n⟩ or ⟨m⟩ followed a vowel, it was often omitted, and a tilde (physically, a small ⟨N⟩) 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 ⟨e⟩.)[citation needed] A tilde represented an omitted ⟨a⟩ or a syllable containing it.[22] The practice of using the tilde over a vowel to indicate omission of an ⟨n⟩ or ⟨m⟩ continued in printed books in French as a means of reducing text length until the 17th century. It was also used in Portuguese and Spanish.[citation needed]

The tilde was also used occasionally to make other abbreviations, such as over the letter ⟨q⟩, making , to signify the word que ("that").[citation needed] It also appears for qua and together with the letter ⟨p⟩ to form for pra.[22]

Nasalization

[edit]

It is also as a small ⟨n⟩ that the tilde originated when written above other letters, marking a Latin ⟨n⟩ which had been elided in old Galician-Portuguese. In modern Portuguese it indicates nasalization of the base vowel: mão "hand", from Lat. manu-; razões "reasons", from Lat. rationes.[citation needed] 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 (IPA) and many other phonetic alphabets. For example, [ljɔ̃] is the IPA transcription of the pronunciation of the French place-name Lyon.

In Breton, the symbol ⟨ñ⟩ after a vowel means that the letter ⟨n⟩ serves only to give the vowel a nasalised pronunciation, without being itself pronounced, as it normally is. For example, ⟨an⟩ gives the pronunciation [ãn] whereas ⟨añ⟩ gives [ã].

In the DMG romanization of Tunisian Arabic, the tilde is used for nasal vowels õ and ṏ.

Palatal n

[edit]

The tilded ⟨n⟩ (⟨ñ⟩, ⟨Ñ⟩) developed from the digraph ⟨nn⟩ in Spanish. In this language, ⟨ñ⟩ is considered a separate letter called eñe (IPA: [ˈeɲe]), rather than a letter-diacritic combination; it is placed in Spanish dictionaries between the letters ⟨n⟩ and ⟨o⟩. In Spanish, the word tilde actually refers to diacritics in general, e.g. the acute accent in José,[23] while the diacritic in ⟨ñ⟩ is called "virgulilla" (IPA: [birɣuˈliʝa]) (yeísta) or (IPA: [birɣuˈliʎa]) (non-yeísta).[24] Current languages in which the tilded ⟨n⟩ (⟨ñ⟩) is used for the palatal nasal consonant /ɲ/ include

Tone

[edit]

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

[edit]

In phonetics, 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, e.g. [ã], [ṽ].
  • A tilde superimposed onto the middle of a letter indicates velarization or pharyngealization, e.g. [ɫ], [z̴]. If no precomposed Unicode character exists, the Unicode character U+0334 ◌̴ COMBINING TILDE OVERLAY can be used to generate one.
  • A tilde below a letter indicates laryngealisation, e.g. [d̰]. If no precomposed Unicode character exists, the Unicode character U+0330 ◌̰ COMBINING TILDE BELOW can be used to generate one.

A tilde between two phonemes indicates optionality, or "alternates with". E.g. ⟨ɕ ~ ʃ⟩ could indicate that the sounds may alternate depending on context (free variation), or that they vary based on region or speaker, or some other variation.

Letter extension

[edit]

In Estonian, the symbol ⟨õ⟩ stands for the close-mid back unrounded vowel, and it is considered an independent letter.

Other uses

[edit]

Some languages and alphabets use the tilde for other purposes, such as:

Punctuation

[edit]

The tilde is used in various ways in punctuation, including:

In some languages (such as in French),[citation needed] a tilde or a tilde-like wave dash (Unicode: U+301C WAVE DASH) may be used as a punctuation mark (instead of an unspaced hyphen, en dash or em dash) between two numbers, to indicate a range. Doing so avoids the risk of confusion with 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".[citation needed] East Asian languages almost always use this convention, but it is sometimes done for clarity in some other languages as well. Chinese uses the wave 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, but rarely in formal grammar or in type-set documents, as a wavy dash preceding a number sometimes represents an approximation (see below).

The range tilde is used for various purposes in French, but only to denote ranges of numbers (e.g., « 21~32 degrés Celsius »" means "21 to 32 degrees Celsius").[citation needed]

(The symbol U+2248 ALMOST EQUAL TO (a double tilde) is also used in French, for example, « ≈400 mètres » means "approximately 400 meters".[citation needed])

Approximation

[edit]

Before a number, the tilde can mean "approximately": e.g., "~42" means "approximately 42".[28] Such usage goes against ISO/IEC 80000-2 and should be avoided. When used with currency symbols that precede the number (national conventions differ), the tilde precedes the symbol, thus for example "~$10" means "about ten dollars".[29][better source needed]

The symbols (almost equal to) and (approximately equal to) are among the other symbols used to express approximation.

Japanese

[edit]

The wave dash (波ダッシュ, nami dasshu) 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.[citation needed]

The sign is used as a replacement for the chōon, katakana character, in Japanese, extending the final syllable.

Chinese

[edit]

WeChat users frequently replace final punctuation with tildes in messages. An analysis of such "innovative uses" of tildes found that final tildes are most used to make the message friendlier and polite. They make expressives more sincere and directives less abrupt. Less commonly, final tildes imply sounds such as onomatopoeia and sound extensions. This use is compared to sajiao (Chinese: 撒娇), a child-like acting seen in East Asian cultures that are also vocalized by raising or extending tone.[30]

Mathematics

[edit]

As a unary operator

[edit]

A tilde in front of a single quantity can mean "approximately", "about"[14] or "of the same order of magnitude as."

As a relational operator

[edit]

In mathematics, the tilde operator (which can be represented by a tilde or the dedicated character U+223C TILDE OPERATOR), sometimes called "twiddle", is often used to denote an equivalence relation between two objects. Thus "x ~ y" means "x is equivalent to y". It is a weaker statement than stating that x equals y. The expression "x ~ y" is sometimes read aloud as "x twiddles y", perhaps as an analogue to the verbal expression of "x = y".[31]

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, f (x) ~ g(x) means that .[13]

In physics and astronomy, a tilde can be used between two expressions (e.g. h ~ 10−34 J s) to state that the two are of the same order of magnitude.[13]

In statistics and probability theory, the tilde means "is distributed as";[13] 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. ABC ~ ∆DEF, meaning triangle ABC is similar to DEF). A triple tilde () is often used to show congruence, an equivalence relation in geometry.[citation needed]

In graph theory, 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

[edit]

The symbol "" is pronounced as "eff tilde" or, informally, as "eff twiddle".[32][33] This can be used to denote the Fourier transform 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 and probability theory, a tilde placed on top of a variable is sometimes used to represent the median 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

[edit]

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 to denote the hypothetical supersymmetric partner. For example, an electron is referred to by the letter e, and its superpartner the selectron is written .

In multibody mechanics, the tilde operator maps three-dimensional vectors to skew-symmetrical matrices (see [34] or [35]).

Economics

[edit]

For relations involving preference, economists 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

[edit]

It can approximate the sine wave symbol (∿, U+223F), which is used in electronics to indicate alternating current, in place of +, −, or ⎓ for direct current.

Linguistics

[edit]

The tilde may indicate alternating allomorphs or morphological alternation, as in //ˈniː~ɛl+t// for kneel~knelt (the plus sign '+' indicates a morpheme boundary).[36][37]

The tilde may represent some sort of phonetic or phonemic variation between two sounds, which might be allophones or in free variation. For example, ~ x] can represent "either [χ] or [x]".

In formal semantics, it is also used as a notation for the squiggle operator which plays a key role in many theories of focus.[38]

In interlinear gloss, a tilde sets off an element added to a word by reduplication; were a hyphen or double hyphen used instead, confusion would arise because that element would be notated in the same way as an independent morpheme requiring an independent gloss.

Computing

[edit]

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 /ˈskɪɡəl/.[39]

Directories and URLs

[edit]

On Unix-like operating systems (including AIX, BSD, Linux and macOS), tilde normally indicates the current user's home directory. For example, if the current user's home directory is /home/user, then the command cd ~ is equivalent to cd /home/user, cd $HOME, or cd.[39] 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.[40] When prepended to a particular username, the tilde indicates that user's home directory (e.g., ~janedoe for the home directory of user janedoe, such as /home/janedoe).[41]

Used in URLs on the World Wide Web, it often denotes a personal website on a Unix-based server. For example, http://www.example.com/~johndoe/ 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 the user's home directory, such as /home/username/public_html or /home/username/www.[42]

In URLs, the characters %7E (or %7e) may substitute for a tilde if an input device lacks a tilde key.[43] Thus, http://www.example.com/~johndoe/ and http://www.example.com/%7Ejohndoe/ will behave in the same manner.

Computer languages

[edit]
Regex
[edit]

The tilde is used in the AWK programming language as part of the pattern match operators for regular expressions:[44]

  • variable ~ /regex/ returns true if the variable is matched.
  • variable !~ /regex/ returns false if the variable is matched.

The operators are also used in the SQL variant of the database PostgreSQL.[45]

A variant of this, with the plain tilde replaced with =~, was adopted in Perl[46]. Ruby also uses this variant without the negated operator.[47]

Negation
[edit]

In APL[48]: 68  and MATLAB,[49] tilde represents the monadic logical function NOT. and in APL it additionally represents the dyadic multiset function without (set difference).[48]: 258 

In C the tilde character is used as bitwise NOT unary operator, following the notation in logic (an ! causes a logical NOT, instead).[50] This is also used by many languages based on or influenced by C, such as C++, C#, D, Java, JavaScript, Perl, PHP, and Python.[51] The MySQL database also use tilde as bitwise invert[52] as does Microsoft's SQL Server Transact-SQL (T-SQL) language.

~~ cast
[edit]

JavaScript also uses tilde as bitwise NOT. Because bitwise operators work on integers, and numbers in JavaScript are 64 bit floating point numbers, the operator converts numbers to a 32-bit signed integer before it performing the negation.[53] The conversion truncates the fractional part and most significant bits. This lets two tildes ~~x to be used as a short syntax to cast to integer. However, it is not recommended as use for truncation. In contrast, it does not truncate BigInts, which are arbitrarily large integers.[54]

Other uses
[edit]

In C++[55] and C#,[56] the tilde is also used as the first character in a class'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 applications, tilde ('~') is used as a shortcut to the root of the application's virtual directory.[57]

In the CSS stylesheet language, the tilde finds the element selected by the right-hand side that shares the parent with an element selected by the left-hand side.[58]

In the D programming language, the tilde is used as bitwise not operator, concatenation operator such as those of arrays,[59] and to indicate an object destructor.[60][61] Tilde operator can be overloaded for user types,[62] 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, "120" + "14" may produce "134" (addition of two numbers), "12014" (concatenation of strings), or something else.[63] 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.[64]: 114–115  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 the Apache Groovy programming language the tilde character overloaded as a bitwise binary negation operation, and as the "pattern operator" that creates a regular expression pattern object. =~ and ==~ can in Groovy be used to match a regular expression.[65]

In Haskell, the tilde is used in type constraints to indicate type equality.[66] Also, in pattern-matching, the tilde is used to indicate a lazy pattern match.[67]

In the Inform 6 programming language, the tilde is used to indicate a quotation mark inside a quoted string. Tilde itself is created by @@126.[68]

In "text mode" of the LaTeX typesetting language a tilde diacritic can be obtained using, e.g., \~{n}, 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{x}. 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.In both text and math mode, a tilde on its own (~) renders a white space with no line breaking.In both text and math mode, a tilde on its own (~) renders a white space with no line breaking.[69] The url package also supports entering tildes directly, e.g., \url{http://server/~name}.[citation needed]

In MediaWiki syntax, four tildes are a shortcut for a user's signature. Three and five tildes puts the signature without timestamp and only the timestamp, respectively.[70]

In Common Lisp, the tilde is used as the prefix for format specifiers in format strings.[71]

In Max/MSP, MSP objects have names ending with a tilde. MSP objects process at the computer's sampling rate and mainly deal with sound.[72]

In Standard ML, the tilde is used as the prefix for negative numbers and as the unary negation operator.[73]

In OCaml, the tilde is used to specify the label for a labeled parameter.[74]

In R, the tilde operator is used to separate the left- and right-hand sides in a model formula.[75]

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.[76]

In Raku, a prefixing tilde converts a value to a string. An infix tilde concatenates strings,[77] taking place of the dot operator in Perl, as the dot is used for member access instead of ->.[78] ~~ is called "the smartmatch operator" and its semantics depend on the type of the right-side argument. Namely, it checks numeric and string equalities, performs regular expression match tests (as opposed to =~ in Perl[78]), and type checking.[77]

my $concatResult = "Hello " ~ "world!";
$concatResult ~~ /<|w><[A..Z]><[a..z]>*<|w>/;

say $/; # outputs "Hello"
# the $/ variable holds the last regex match result

In YAML, the "Core schema," a set of aliases that processors are recommended to use, resolves a tilde as null.[79]

Keyboards

[edit]

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 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 that key and then a letter produces the tilde-accented form of that letter. (For example, ~ a 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. Thus AltGr+# followed by a letter produces the accented form of that letter.
  • With a Mac either of the Alt/Option keys function similarly.
  • With Linux, the compose key facility is used.

Instructions for other national languages and keyboards are beyond the scope of this article.

Backup filenames

[edit]

The dominant Unix convention for naming backup copies of files is appending a tilde to the original file name. It originated with the Emacs text editor[80] and was adopted by many other editors and some command-line tools.

Emacs also introduced an elaborate numbered backup scheme, with files named filename.~1~, filename.~2~ and so on.[81] It didn't catch on, as the rise of version control software eliminates the need for this usage.[citation needed]

Microsoft filenames

[edit]

The tilde was part of Microsoft's filename mangling scheme when it extended the FAT file system standard to support long filenames for Microsoft Windows. 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, "Program Files" might become "PROGRA~1".[82]

The tilde symbol is also often used to prefix hidden temporary files that are created when a document is opened in Windows.[citation needed] 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.[83]

Juggling notation

[edit]

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 is thus represented as (~2x,1)(1,2x)(2x,~1)*.[84]

Unicode encoding

[edit]

Letters with tilde

[edit]

Unicode encodes a number of cases of "letter with tilde" as precomposed characters and these are displayed below. In addition, many more symbols may be composed using the combining character facility (U+0303 ◌̃ COMBINING TILDE, U+0330 ◌̰ COMBINING TILDE BELOW and others) that may be used with any letter or other diacritic to create a customised symbol but this does not mean that the result has any real-world application and are not shown in the table.

A tilde diacritic can be added to almost any character by using a combining tilde. Greek and Cyrillic letters with tilde (Α͂ ᾶ, Η͂ ῆ, Ι͂ ῖ, ῗ, Υ͂ ῦ, ῧ and А̃ а̃, Ә̃ ә̃, Е̃ е̃, И̃ и̃, О̃ о̃, У̃ у̃, Ј̃ j̃) are formed using this method.

Unicode and Shift JIS encoding of wave dash

[edit]
Correct JIS wave dash
Correct JIS wave dash, current in Unicode
Previous Unicode wave dash (incorrect)
Previous Unicode wave dash (incorrect)

In practice the full-width tilde (全角チルダ, zenkaku chiruda) (Unicode U+FF5E FULLWIDTH TILDE), is often used instead of the wave dash (波ダッシュ, nami dasshu) (Unicode U+301C WAVE DASH), because the Shift JIS code for the wave dash, 0x8160, which should be mapped to U+301C,[85][86] is instead mapped to U+FF5E[87] in Windows code page 932 (Microsoft'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:[88] the wave dash reference glyph in JIS / Shift JIS[89][90] matches the Unicode reference glyph for U+FF5E FULLWIDTH TILDE,[91] while the original reference glyph for U+301C[88] was reflected, incorrectly,[92] when Unicode imported the JIS wave dash. In other platforms such as the classic Mac OS and macOS, 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 character set, in which Microsoft maps the EUC-KR or UHC code for the wave dash (0xA1AD) to U+223C TILDE OPERATOR,[93][94] while IBM and Apple map it to U+301C.[95][96][97] Microsoft also uses U+FF5E to map the KS X 1001 raised tilde (0xA2A6),[94] while Apple uses U+02DC ˜ SMALL TILDE.[97]

The current Unicode reference glyph for U+301C has been corrected[92] to match the JIS standard[98] 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, all other major platforms including later versions of Microsoft Windows shipped with fonts matching the JIS reference glyph for U+301C.[99]

The JIS / Shift JIS wave dash is still formally mapped to U+301C as of JIS X 0213,[100] whereas the WHATWG Encoding Standard used by HTML5 follows Microsoft in mapping 0x8160 to U+FF5E.[101] These two code points have a similar or identical glyph in several computer fonts, reducing the confusion and incompatibility.

See also

[edit]

Notes

[edit]

References

[edit]
Revisions and contributorsEdit on WikipediaRead on Wikipedia
from Grokipedia
The tilde (~) is a diacritical mark and typographical symbol, resembling a small wavy line, that originated as a shorthand abbreviation in medieval Latin manuscripts to indicate omitted letters, particularly nasal consonants.[1] It derives from the Latin word titulus, meaning a superscript or title, and entered English usage in the 19th century as "tilde," reflecting its role as a modifier above letters.[2] Today, it serves multiple functions across linguistics, mathematics, and computing, making it a versatile element in both written and digital contexts.[3] In linguistics, the tilde is primarily employed as a diacritic to alter pronunciation, such as over the letter n in Spanish to form ñ (e.g., señor, denoting a palatal nasal sound \nʸ), or over vowels in Portuguese to indicate nasality (e.g., irmã).[2] Its historical roots trace back to ancient Greek notations for vocal pitch, evolving through Latin scribal practices into a standard accent in Iberian Romance languages, where it remains essential for accurate orthography and phonetics.[3] Beyond European languages, it appears in some phonetic representations in Asian scripts, though its use is less standardized there.[3] In mathematics and logic, the tilde denotes approximation (e.g., π ~ 3.14), similarity between geometric figures, or negation in logical expressions.[2] In computing and programming, it represents the user's home directory in Unix-like systems (e.g., ~/documents), serves as a bitwise NOT operator in languages like C and JavaScript to invert binary bits, and functions as a negation or concatenation symbol in others, such as D.[4] Informally, it conveys approximation in everyday text (e.g., ~7 AM) or adds a playful, ironic tone in online communication.[3] These diverse applications underscore the tilde's enduring adaptability from ancient scripts to modern digital interfaces.

History

Medieval Scribal Use

The tilde originated as a scribal suspension mark in medieval Latin manuscripts, primarily during the 8th to 11th centuries, where it served to indicate omitted letters such as -m, -n, or -r at the end of words, thereby expediting the writing process in an era when parchment was scarce and scribes aimed for efficiency.[5] This practice was widespread in Insular scripts, including those used in Anglo-Saxon England and Ireland, as a form of abbreviation that allowed scribes to suspend the final consonants after vowels without losing readability.[6] For instance, a tilde over the letter q, rendered as q̃, commonly abbreviated the conjunction -que ("and"), while similar marks over vowels denoted nasal omissions like -n in words such as "ho[min]es" (men).[7] Examples of such abbreviations include "omne[m]" for "omnem" (all, accusative) and "locutio[n]is" for "locutionis" (of speech), reflecting the mark's role in condensing repetitive phrases in Latin texts.[8] These abbreviations were essential for voluminous documents, enabling rapid transcription while maintaining the text's interpretability.[9] Over time, the tilde evolved from simpler straight or horizontal strokes, which could be confused with other diacritics, to a more distinctive curved shape in handwriting, enhancing clarity amid the fluidity of medieval scripts.[10] This development distinguished it from the macron, a straight bar primarily used to indicate vowel length or certain contractions, whereas the tilde specifically signaled nasal or consonantal suspensions.[5] The tilde's adoption influenced early European vernacular scripts, spreading through monastic copying traditions and laying groundwork for its later typographic forms in printed texts.[7]

Evolution in Printing and Typewriters

With the advent of movable type printing in the mid-15th century, pioneered by Johannes Gutenberg around 1450, the tilde transitioned from a scribal abbreviation mark to a typographic element in printed books, particularly for representing nasal sounds in vernacular languages such as Spanish and Portuguese.[1] Early printers faced significant challenges in reproducing the tilde, as it was often overprinted onto base letters using separate type pieces or achieved through ligatures combining the tilde with vowels or consonants like n to form characters such as ñ. This method allowed for the inclusion of diacritics in texts like the 1492 Spanish grammar by Antonio de Nebrija, where the tilde marked abbreviations and phonetic nuances, but it required precise alignment to avoid misalignment in hot-metal casting.[11] By the 19th century, as mechanical typewriters emerged, the tilde's role expanded to facilitate the production of accented characters in multilingual documents, addressing the limitations of limited keysets. Dead-key mechanisms, introduced in the late 19th century on international typewriter models and refined in subsequent designs, enabled users to strike the tilde key without advancing the carriage, allowing it to overlay letters such as n to compose ñ for Spanish and Portuguese texts. This innovation was crucial for professional typists handling international correspondence, as it compensated for the absence of dedicated keys for every diacritic. The Underwood Typewriter Company, a dominant manufacturer from the late 19th century onward, played a key role in standardizing the tilde through its international keyboard variants, which featured dead keys for accents including the tilde. These layouts, common by the 1910s, promoted the tilde as a standalone symbol on typewriter keyboards, influencing global typing practices and paving the way for its inclusion in later mechanical and electric models.[12] In the early 20th century, typographers debated the tilde's glyph design, particularly its curvature and width, to ensure harmony with non-Latin scripts and extended Latin alphabets, such as in Portuguese orthography where J-shaped tildes were proposed for aesthetic integration in hot-metal printing. These discussions, documented in works on diacritic evolution, highlighted tensions between traditional swung-dash forms and more angular variants to improve legibility in multilingual typesetting, influencing standards for scripts like Vietnamese that adopted the tilde for tones.[13]

Standardization in ASCII

The American Standard Code for Information Interchange (ASCII) was developed from 1963 to 1967 by the X3.2 subcommittee of the American Standards Association (ASA) X3 committee, with the initial standard published as X3.4-1963 on June 17, 1963, and revised to X3.4-1967 to incorporate international feedback.[14] This 7-bit encoding scheme allocated 128 code points, with the upper 32 positions (95–126 decimal) designated for printable graphic characters beyond basic letters, digits, and common punctuation. The tilde (~) was specifically assigned to code point 126 (hexadecimal 7E, or column 7/row 14 in the ASCII table), marking it as one of the high-order symbols to fill out the character repertoire for data processing and transmission needs.[14] The inclusion of the tilde stemmed from its legacy in teletype and telegraph equipment, where it appeared as a non-letter symbol on keyboards like the Teletype Wheatstone Perforator models from 1937 and 1945, providing a versatile graphic for signaling and markup without conflicting with alphanumeric codes.[14] This choice addressed the demand for additional punctuation-like symbols in computing, distinct from letters or numbers, while drawing briefly from typewriter influences that had already popularized the glyph for diacritical and approximation uses. In parallel developments, the ASCII design aligned closely with emerging international standards; the tilde's position was confirmed during 1966 ISO and CCITT meetings, influencing variants of ISO 646 (finalized in 1967), which adopted a similar 7-bit structure but allowed national substitutions in some positions, ensuring the tilde's portability across systems.[14][15] On early computers such as the PDP-11 series from Digital Equipment Corporation, introduced in 1970, the tilde's standardization in ASCII facilitated text handling, file naming, and operator interfaces, as the architecture natively supported 7-bit ASCII for I/O and memory operations.[16] Its role extended to distinguishing it from typographic variants like the swung dash (⁓, Unicode U+2053), a more wavy mark used in dictionaries for word omission; the ASCII tilde employed a simpler, straight waveform suitable for low-resolution terminals and printers, avoiding ambiguity in digital rendering.[17] As computing shifted to 8-bit systems, the tilde evolved through extensions like IBM's EBCDIC, where it was remapped to code point 175 (hexadecimal AF) to accommodate mainframe-specific ordering, diverging from ASCII's layout while retaining the glyph for compatibility in data conversion.[18] In contrast, ISO 8859 standards (starting with ISO 8859-1 in 1987) preserved the tilde at 0x7E in the lower 128 positions, centralizing its form as an extension of ASCII for Western European languages and reinforcing its status as a universal symbol in multibyte environments.[14]

Ties to Spanish Orthography

The word "tilde," referring to the diacritical mark (~) used over the letter n to form ñ, derives from the Spanish term rooted in Medieval Latin titulus, meaning "superscript" or "title," which denoted a small stroke or mark added above a letter to indicate abbreviation or emphasis.[19] This etymological connection reflects its medieval scribal origins, where the tilde served as a superscript to shorten the digraph nn into ñ, representing the palatal nasal sound /ɲ/ absent in classical Latin, as seen in words like año from Latin annus. The tilde's adoption in Castilian Spanish emerged in the 12th century as a scribal abbreviation to distinguish the /ɲ/ sound from the geminate nn, streamlining medieval manuscripts amid the language's evolution from Vulgar Latin.[20] By the 13th century, King Alfonso X el Sabio formalized its use in Castilian orthography through his scholarly works, establishing ñ as the standard grapheme for /ɲ/ and promoting linguistic unification in the Iberian Peninsula.[21] This development solidified around the 15th century with the advent of printing, which perpetuated ñ as a distinct character in printed texts, differentiating it definitively from nn in evolving Spanish phonology.[22] The Real Academia Española (RAE), founded in 1713, played a pivotal role in standardizing the tilde's use in the 18th century, officially recognizing ñ as the 15th letter of the Spanish alphabet in its early dictionaries and orthographic guidelines to preserve phonetic accuracy.[23] This codification, detailed in the RAE's 1803 dictionary, ensured ñ's integration into formal Spanish orthography, countering inconsistencies from earlier regional variations.[23] Culturally, the tilde holds profound significance as an emblem of Spanish identity, symbolizing linguistic heritage and resistance to assimilation under global English influence. In the late 20th century, particularly during the 1990s, the European Economic Community proposed eliminating ñ and accents to standardize computer keyboards for broader European integration, prompting vehement defenses from the RAE and figures like Gabriel García Márquez, who argued that ñ uniquely distinguished Spanish speakers worldwide.[23] These preservation efforts, including RAE campaigns, underscored ñ's role in maintaining cultural autonomy amid technological and anglophone pressures.[24] The tilde's influence extends to other Iberian languages, notably Galician, where ñ represents the same /ɲ/ sound, reflecting shared medieval roots in the Ibero-Romance family and mutual orthographic borrowing from Castilian.[20] Through Spanish colonial expansion starting in the 15th century, the tilde-embedded ñ spread across Latin America via Castilian missionaries, administrators, and settlers, embedding it in the orthography of over 20 nations and fostering a pan-Hispanic linguistic unity that endures today.

Uses in Writing and Linguistics

Everyday English Applications

In informal English writing, the tilde (~) serves as a symbol for approximation, particularly when paired with numbers to denote "about" or "approximately" without using full words. This usage is common in casual notes, quick messages, and journalism, where brevity is valued; for instance, "~5-10 minutes" might indicate an estimated travel time rather than a precise range.[3] Such applications emerged in the 20th century as part of broader typographic shorthand practices, evolving from the tilde's historical role as a Latin abbreviation mark for omitted letters or sounds.[1] In digital communication, the tilde has taken on expressive roles to convey sarcasm, playfulness, or irony, often through bracketing words or phrases like "cool" to add a winking or self-aware tone that softens or undermines the literal meaning. This practice gained traction in the 1990s and 2000s via early internet platforms such as instant messaging and forums, where limited formatting options encouraged creative punctuation to mimic vocal inflections absent in text.[25] Linguist Gretchen McCulloch notes that tildes function as a "sarcasm tilde" in online discourse, helping to signal ironic intent in a medium prone to misinterpretation, as seen in social media posts where "perfect" highlights mock enthusiasm. By the 2010s, this had become a staple of internet slang, blending sincerity with subtle critique to foster a playful, community-driven style of expression.[26] The tilde also appears as a typographic substitute in plain text environments like early email and ASCII-based systems, where it approximates the visual flow of an em dash (—) for pauses or emphasis, such as in "or so" to create a casual break. This adaptation arose in the pre-Unicode era of computing, when character sets limited access to specialized punctuation, leading users to repurpose the readily available tilde for dash-like effects in signatures or informal correspondence.[27] Historically, the tilde's standalone use in English was rare before the late 20th century, primarily confined to diacritical roles borrowed from Romance languages, but its integration into computing keyboards and networks post-1980s propelled it into everyday ubiquity. The Oxford English Dictionary traces this shift to digital contexts, where the symbol's versatility in programming and file paths spilled over into casual writing, amplified by internet culture's embrace of ironic and approximate notations from the 1990s onward.[28] Today, this evolution reflects broader changes in English prose, prioritizing adaptable, tone-conveying symbols in informal settings over rigid formal conventions.[1]

Diacritical Functions

The tilde serves as a diacritic primarily to indicate nasalization of vowels in several languages. In Portuguese, it appears over the vowels a and o to denote nasal vowels, such as in mão (hand, pronounced [mɐ̃w̃]) and pão (bread, pronounced [pɐ̃w̃]), distinguishing them from their oral counterparts and altering pronunciation through velum lowering for airflow through the nose.[29] Historically in French, the tilde marked nasalization during the Old French period (circa 900–1300 CE), where vowels before nasal consonants were nasalized, as seen in scribal notations like bẽ for bien (well); this usage faded by the Middle French era as nasal vowels became phonemic without consistent diacritic representation.[30] In Spanish, the tilde over n forms the letter ñ, representing the palatal nasal consonant /ɲ/, as in niño (child, pronounced [ˈni.ɲo]), evolving from medieval abbreviations of Latin nn or ni.[31] Beyond nasalization, the tilde functions in tone marking for certain languages. In Vietnamese, it indicates the ngã tone, a creaky rising contour (starting mid-low with glottal constriction and rising sharply), as in (horse, pronounced with a broken, rising pitch [ma̰˥]).[32] In transliterations of Ancient Greek, the tilde sometimes approximates the circumflex pitch accent (a high-low pitch fall on a long vowel or diphthong), distinguishing it from the acute (rising) accent in scholarly notations, such as rendering phōnḗ (voice) to reflect the melodic contour of classical pronunciation systems.[33] The tilde also extends letters to represent specific phonetic qualities. In Estonian, õ denotes an unrounded mid-central vowel /ɤ/, a unique phoneme in the language's nine-vowel system, as in kõrv (ear, pronounced [kɤrv]), contrasting with rounded vowels like ö /ø/.[34] In the International Phonetic Alphabet (IPA), the combining tilde ◌̃ signifies nasalization over vowels (e.g., [ã] for nasalized /a/), but it can also overlay for velarization/pharyngealization (◌̴, though distinct in some notations) or rhoticity in extensions, allowing precise transcription of phonetic nuances across languages.[35] In digital representation, the tilde exists in both precomposed forms (e.g., ã as Unicode U+00E3) and combining forms (U+0303 ◌̃, a non-spacing mark applied above a base character like a to form ã), facilitating compatibility in text encoding for languages with diacritics; the combining variant is preferred in systems supporting normalization to handle stacking or script variations. African languages like Yoruba employ the tilde in phonetic representations (IPA) for nasal vowels, marking phonemic nasalization (e.g., [ã] for the nasalized /a/, though often realized via following nasals like an in standard writing), where it distinguishes nasal from oral vowels in the seven-oral-five-nasal system without altering consonant pronunciation.[36]

Punctuation and Typographic Roles

In French typography, the tilde () functions as a punctuation mark to denote a range between two numbers or values, as in "1215" to indicate from 12 to 15, serving a similar role to the en dash but in more concise or informal contexts.[37] This usage emphasizes brevity in numerical expressions without implying strict mathematical operations. In informal English writing, the tilde similarly acts as a range or approximation indicator within lists or sequences, such as "~5-10 items" to suggest an estimated quantity, avoiding the need for words like "about" or "between."[38] This application extends to casual notations where precision is secondary to readability. The wave dash (〜), a full-width variant distinct from the ASCII tilde (~), plays a key role in Japanese punctuation for indicating ranges in time, distance, or locations, exemplified by "東京〜大阪" (Tokyo to Osaka) or "5時〜6時" (5 o'clock to 6 o'clock).[39] It also facilitates enumeration in lists by separating items and provides spacing in titles, such as dividing a main title from a subtitle on the same line, enhancing visual flow in vertical or horizontal text layouts.[40] In Chinese typography, elongated forms of the tilde, known as the bōlàng hào (波浪号, wave dash ~), are employed to mark ranges or approximations, akin to its Japanese counterpart, and occasionally for brief pauses in informal prose to mimic spoken rhythm.[41] This punctuation aids in clarifying numerical spans, like "1~10" for "1 to 10," while its wavy form adds a subtle divider effect in sentences. As a typographic element, the tilde functions as an approximation symbol across scripts, often approximating values or serving as a visual divider in layouts to separate sections without abrupt breaks.[42] Historically, in medieval European manuscripts, a tilde-like squiggle was used as an abbreviation mark, suspended above letters to denote omitted nasals such as "m" or "n," functioning as a compact punctuation aid in scribal notation.[43] Regional variations include its integration in Korean typography, where the tilde () denotes numerical ranges in Hangul texts, such as "110," and occasionally appears in informal combinations with jamo elements for stylistic emphasis in digital writing.[44]

Phonetic and Dialectal Notations

In phonetic transcription, particularly within extensions to the International Phonetic Alphabet (IPA), the tilde serves as a combining diacritic for advanced articulatory features. The superimposed tilde (̴, IPA number 428, Unicode U+0334) overlays a base symbol to denote velarization or pharyngealization, indicating guttural or emphatic consonants produced with retraction of the tongue root toward the velum or pharynx; for example, [n̴] represents a pharyngealized nasal consonant, common in languages like Arabic or Berber.[45] Similarly, the combining tilde below (̰, IPA number 430, Unicode U+0330) marks creaky voice or laryngealization, where the vocal folds vibrate irregularly for a glottalized or harsh quality, as in certain African or Native American languages.[46] These notations extend beyond standard nasalization (briefly, the tilde above a vowel like [ã] for basic nasal airflow, as defined in core IPA diacritics).[45] In descriptive linguistics, the freestanding tilde () frequently marks allomorphs—contextually conditioned variants of a morpheme—or dialectal variations to highlight phonological alternations without implying strict equivalence. For instance, linguists may notate English plural forms as /zɪz/ to show the voiced fricative or epenthetic vowel insertion after sibilants, or dialectal spellings like color~colour to denote American versus British realizations of the same lexical item. This convention appears in analyses of Tibeto-Burman or Papuan languages, where allomorphs of pronominal clitics are separated by tilde to indicate phonologically predictable shifts, aiding clarity in morphological descriptions.[47] Such usage underscores the tilde's role in capturing subphonemic variability across idiolects or regional dialects. Within phonology, especially comparative studies, the tilde denotes equivalence, alternation, or approximation between sounds, often linking allophones in free variation or historical correspondences. In notations like [ɻ~ʐ], it signals that a retroflex approximant and fricative alternate in a speaker's realization, as seen in Mandarin or English rhotic sounds, facilitating cross-dialectal comparisons. This application extends to historical linguistics, where ~ approximates proto-forms to reflexes, such as *k ~ x in Indo-European velar shifts, emphasizing relational patterns over identity.[48] In constructed languages (conlangs), the tilde occasionally functions as a diacritic for uvular sounds, particularly in Esperanto derivatives or experimental systems aiming to expand phonetic inventory. For example, some Ido or Occidental variants—reforms of Esperanto—employ a tilde over consonants like [q̃] to approximate uvular fricatives or stops, accommodating uvular articulations absent in standard Esperanto's simple phonology while maintaining Latin-script compatibility.[49] This usage reflects conlang designers' adaptation of IPA-inspired notations for non-natural phonemes in revived or auxiliary languages.

Uses in Mathematics and Sciences

Mathematical Operations

In propositional logic, the tilde serves as a unary operator denoting negation, where ~P represents the negation of the proposition P, meaning "not P."[50] This notation, also called the tilde or negation symbol, applies to the entire proposition it precedes and is one of several conventions for unary negation, alongside ¬ and -.[51] Its use in logical expressions emphasizes the inversion of truth value, with ~P being true if P is false and vice versa.[50] The tilde also appears in relational contexts within mathematics. In geometry, ~ denotes similarity between figures, such as triangles, where corresponding angles are equal and sides are proportional, as in ΔABC ~ ΔDEF.[52] This usage traces back to Gottfried Wilhelm Leibniz in an unpublished manuscript, with its first printed appearance in 1710, distinguishing it from congruence (denoted ≅, an equals sign with a tilde above).[52] In set theory and algebra, ~ indicates an equivalence relation, where x ~ y means x and y are related under a reflexive, symmetric, and transitive binary relation, often extending to isomorphism between structures, such as groups or vector spaces, where the tilde signifies structural equivalence without identity.[53] This relational role underscores approximate or structural parity, separate from exact equality (=) or mere approximation (≈).[53] A prominent application of the tilde is in asymptotic analysis, where f(x) ~ g(x) as x → ∞ denotes asymptotic equivalence, meaning the limit of f(x)/g(x) approaches 1, indicating the functions share the same leading-order behavior.[54]
limxf(x)g(x)=1 \lim_{x \to \infty} \frac{f(x)}{g(x)} = 1
This notation prioritizes dominant terms in limits, as seen in analytic number theory and complex analysis, and differs from big-O notation by requiring precise ratio convergence rather than bounding.[54] For instance, the prime number theorem states π(x) ~ x / ln(x), capturing the density of primes asymptotically.[54] Historically, the tilde's mathematical notations emerged in the 18th and 19th centuries, with Leibniz's early geometric uses laying groundwork, and by the late 19th century, Giuseppe Peano employed ~ for negation in logical texts like Studii di logica matematica (1897).[55] In Fourier analysis, the tilde denotes the transform of a function, as in \tilde{f}(ω) for the Fourier transform of f(t), a convention solidifying in early 20th-century texts building on Joseph Fourier's 1822 work, though not directly used by Fourier himself.[56] This diacritic highlights frequency-domain representations in harmonic analysis.[57]

Applications in Physics

In perturbation theory, particularly in quantum mechanics, the tilde notation is commonly used to denote the wave function in the interaction picture, which simplifies the analysis of small deviations from an unperturbed Hamiltonian $ H = H_0 + \lambda V $, where $ \lambda $ is an infinitesimal parameter characterizing the strength of the perturbation $ V $.[58] This auxiliary state, written as $ |\tilde{\Psi}(t)\rangle = e^{i H_0 t / \hbar} |\Psi(t)\rangle $, evolves under the transformed perturbation $ \tilde{\delta H}(t) = e^{i H_0 t / \hbar} \delta H(t) e^{-i H_0 t / \hbar} $, enabling perturbative expansions to first or higher orders in $ \lambda $.[58] Such notation is essential for calculating transition probabilities and energy corrections in systems like atomic spectra under weak external fields. In supersymmetry, a theoretical framework extending the Standard Model of particle physics, the tilde serves as a conventional marker for superpartners, which are bosonic or fermionic counterparts to ordinary particles predicted by the symmetry. For instance, the selectron $ \tilde{e} $ is the scalar superpartner of the electron, transforming under the same gauge representations but with spin differing by 1/2.[59] This notation highlights the pairing of matter fields with their supersymmetric partners, such as $ \tilde{q} $ for squarks, and is ubiquitous in model-building for phenomena like electroweak symmetry breaking and dark matter candidates.[60] The tilde also appears in quantum mechanics for denoting complex conjugates of wave functions in contexts involving symmetry operations, such as time reversal, where the operator $ \tilde{T} $ effectively applies complex conjugation to $ \psi $, yielding $ \tilde{\psi} = \psi^* $ alongside spatial inversion. This usage underscores the role of complex conjugation in preserving probabilities and ensuring unitarity in time-reversal invariant systems, as seen in scattering theory and CPT symmetry analyses. In relativistic physics, the tilde between quantities, as in $ v \sim c $, signifies approximations where velocities approach the speed of light, invoking significant Lorentz contractions and time dilations central to special relativity. Similarly, in fluid dynamics, the tilde denotes normalized or filtered variables in approximation schemes, such as $ \tilde{v} $ for the filtered velocity in large eddy simulations of turbulent flows, capturing large-scale motions while modeling small-scale effects statistically.[61] These applications emphasize the tilde's role in scaling analyses and asymptotic behaviors specific to physical regimes.

Economic and Symbolic Representations

In economics, the tilde symbol (~) serves as a notation for indifference in consumer preference theory, particularly in the context of indifference curves. An indifference curve represents all combinations of goods that provide a consumer with the same level of utility, and the relation $ x \sim y $ indicates that bundles $ x $ and $ y $ yield equivalent satisfaction, such that $ U(x) \sim U(y) $, where $ U $ is the utility function.[62] This notation underscores the ordinal nature of preferences, allowing economists to model consumer behavior without assuming cardinal measurability of utility. The adoption of the tilde for indifference relations became widespread in 20th-century microeconomics textbooks, reflecting a shift toward formalized preference structures following the ordinalist revolution in the early 20th century. Seminal texts, such as those developing general equilibrium theory, integrated this symbol to precisely capture equivalence in consumer choices, facilitating graphical and analytical representations of budget constraints and optimal consumption. For instance, in advanced treatments, it distinguishes indifference from strict preference ($ \succ )andweakpreference() and weak preference ( \succeq $), ensuring consistency with axioms like completeness and transitivity.[62] In econometric modeling, the tilde denotes approximation or distributional assumptions, often in the context of statistical inference for economic variables. For example, in linear regression frameworks, the model is specified as $ y_i \sim N(x_i' \beta, \sigma^2) $, indicating that the dependent variable (such as GDP growth) is approximately normally distributed conditional on regressors like inflation rates, with parameters $ \beta $ capturing the relationship. This usage highlights asymptotic properties in large-sample econometrics, where estimates converge in distribution, providing a probabilistic approximation rather than exact equality. Within game theory, a branch of economic analysis, the tilde symbolizes indifference between strategies, crucial for characterizing mixed strategy Nash equilibria. In such equilibria, a player randomizes over pure strategies in the support of the mixed strategy because they yield equivalent expected payoffs; thus, a mixed strategy $ \sigma $ satisfies $ u(i, \sigma) \sim u(i, s) $ for pure strategies $ s $ in the support, where $ u $ is the payoff function. This notation emphasizes strategic equivalence, enabling the analysis of non-degenerate equilibria in games like matching pennies, where pure strategies alone fail to stabilize outcomes.

Electronics and Engineering Contexts

In electrical engineering, the tilde symbol () is commonly employed to denote alternating current (AC) in power specifications and device labeling. For example, notations such as "120V60Hz" indicate an AC voltage of 120 volts at a frequency of 60 hertz, distinguishing it from direct current (DC).[63] This usage simplifies representation in compact spaces like multimeter dials, where ~ appears alongside units like V~ for AC voltage or A~ for AC current.[64] Although international standards such as IEC 60417 specify a full sine wave as the primary graphical symbol for AC, the tilde serves as a practical shorthand in labels and informal diagrams to evoke the oscillatory nature of AC waveforms. In schematic diagrams and circuit representations, the tilde functions as a generic indicator of waveforms, particularly for AC signals or modulated outputs. It is often integrated into symbols, such as a tilde with an arrow to represent adjusted or dimmed AC in lighting controls like dimmer switches. This application highlights its role in visualizing signal behavior without requiring detailed waveform drawings, aiding quick interpretation in engineering blueprints. Within signal processing and circuit analysis, the tilde denotes the Fourier transform of time-domain signals, enabling engineers to shift to the frequency domain for tasks like filter design and harmonic analysis. For instance, if $ v(t) $ represents a voltage signal over time, its Fourier transform is denoted as $ \tilde{v}(\omega) $, where $ \omega $ is angular frequency, allowing evaluation of circuit responses to sinusoidal components.[65] This notation facilitates approximations in complex analyses, such as estimating impedance or gain in amplifiers by ignoring minor frequency terms.[57] Engineering standards, including those from the IEEE, adopt the tilde for denoting approximations of variables in calculations and simulations, particularly where precise values are unnecessary for practical design. In IEEE-recommended practices for power systems and circuit modeling, ~ signals that a quantity like resistance or capacitance is estimated within acceptable tolerances, supporting efficient iterative design processes.[53] This usage underscores the tilde's versatility in balancing accuracy with computational feasibility in electronics applications.

Uses in Computing

File Systems and Navigation

In Unix-like operating systems, the tilde character (~) functions as a symbolic shortcut representing the current user's home directory within file paths, facilitating concise navigation. For instance, the path ~/Documents expands to the full absolute path /home/username/Documents, where username is the logged-in user. This expansion is a standard feature defined in POSIX shell specifications, allowing seamless reference to user-specific locations without specifying the complete directory structure.[66] Tilde expansion is handled by command-line shells such as Bash and Zsh through predefined rules that process the tilde at the beginning of a word, replacing it with the value of the $HOME environment variable or the specified user's home directory if followed by a username (e.g., ~otheruser expands to /home/otheruser). These rules prioritize unquoted tildes followed by a slash or end-of-word, ensuring predictable behavior in commands like cd ~/Downloads or ls ~otheruser/Pictures. The mechanism originated in the C shell (csh), developed by Bill Joy at the University of California, Berkeley, in the late 1970s as part of the Berkeley Software Distribution (BSD); Joy's implementation introduced tilde as a filename expansion for home directories to simplify user interactions in early Unix environments.[67] This convention extends across platforms, with macOS—built on a Unix foundation—supporting tilde expansion natively in its default Zsh shell, mirroring Linux behaviors for file system navigation. On Windows, Unix-like environments such as Cygwin emulate the feature by providing a POSIX-compliant Bash shell, where ~ resolves to the user's home directory (typically C:\cygwin\home\username), enabling cross-platform scripting and tool compatibility. Similarly, in web contexts, many HTTP servers like Apache use ~username in URLs to denote a user's personal web space, such as http://[example.com](/page/Example.com)/~username pointing to /home/username/public_html for hosting user pages—a practice rooted in early Unix web serving conventions. Despite its utility, tilde expansion has limitations and does not occur universally; for example, it fails in quoted strings (e.g., echo "~/file" outputs the literal tilde) or when the tilde appears in plain filenames without path context (e.g., a file named ~ remains unexpanded as a literal name). Expansion also depends on shell context, such as interactive versus non-interactive modes, and may not apply in variable assignments or embedded positions without proper word boundaries, requiring explicit handling in scripts to avoid unexpected literal interpretations.[66]

Programming and Software Conventions

In programming languages derived from C, such as C, C++, and Java, the tilde (~) serves as the unary bitwise NOT operator, which inverts all bits in the binary representation of its integer operand. For example, applying ~x to an integer x flips each 0 to 1 and each 1 to 0, effectively computing the one's complement; in two's complement systems, this results in -x - 1.[68][69] This operator is defined only for integral types (e.g., int, long) and promotes the operand to the appropriate integer type before inversion, producing a result of the same type. It is commonly used in low-level bit manipulation tasks, such as masking flags or implementing efficient arithmetic operations, though care must be taken with signed integers due to sign extension. The same semantics apply in Python, where ~ performs bitwise inversion on integers, treating them as unlimited-precision but aligning with C-like behavior for positive values. In Perl, the tilde appears in the binding operators =~ and !~, which test a scalar against a regular expression pattern for matching or non-matching (negation), respectively. The operator =~ returns true if the string matches the regex (e.g., $string =~ /pattern/), enabling pattern-based conditional logic, while !~ negates this, succeeding only if no match occurs. These operators integrate regex directly into expressions without needing explicit function calls, a convention that distinguishes Perl's idiomatic style for text processing. Unlike standalone metacharacters, the tilde here functions as part of the binding syntax rather than a wildcard; negation is achieved via the explicit ! prefix rather than the tilde alone.[70] Within numerical computing libraries like NumPy in Python, the tilde (~) acts as an alias for numpy.invert or np.bitwise_not, performing element-wise bitwise NOT on integer arrays or logical NOT on boolean arrays. For instance, ~bool_array flips each True to False and vice versa, facilitating efficient array-based conditional operations such as inverting masks in data filtering (e.g., selecting non-matching elements). This unary operator supports broadcasting and works seamlessly with multidimensional arrays, but it is restricted to integer or boolean dtypes and does not handle floating-point values directly. While NumPy provides separate functions like np.isclose for approximate equality comparisons, the tilde itself remains tied to bitwise and logical inversion, underscoring its role in vectorized bit-level computations.[71] These usages highlight the tilde's adaptation across language paradigms, from low-level bit operations to higher-level pattern and numerical handling.

Keyboard Input and Character Handling

On standard US QWERTY keyboards, the tilde (~) is accessed by pressing Shift combined with the backtick (`) key, located to the left of the 1 key and below the Esc key.[72] In international layouts, such as those used for Spanish or other Romance languages, the tilde diacritic is often applied to letters like n to form ñ by pressing AltGr + N.[73] These layouts facilitate the input of accented characters common in non-English languages, with the tilde serving as a combining mark in many cases. For diacritic input, operating systems employ specialized methods to handle the tilde. On Windows, using the US International keyboard layout, the tilde functions as a dead key: pressing ~ followed by a letter like n produces ñ, while pressing ~ followed by space yields the standalone tilde.[74] In Linux environments, the compose key enables sequence-based input, such as pressing Compose, then ~, then n to generate ñ; this mechanism relies on X11 compose files that define tilde combinations for various characters.[75] The tilde is standardized in ASCII at code point 126, ensuring consistent representation across systems.[76] The evolution of tilde input traces from mechanical typewriters in the late 19th century, where dedicated keys or shift mechanisms allowed its printing for diacritics and symbols, to modern virtual keyboards on mobile devices.[77] On iOS and Android, users access the tilde by long-pressing relevant letter keys (e.g., n for ñ) or the symbols menu, promoting ease on touch interfaces.[78] In non-Latin script regions, such as those using Cyrillic or Arabic keyboards lacking a native tilde key, accessibility is achieved via Alt codes (e.g., Alt + 126 on Windows numeric keypad) or on-screen keyboards, though this can introduce friction for frequent use in multilingual contexts.[78] Software handling varies by language input method editors (IMEs). In Japanese IME on Windows, the tilde key often inputs the wave dash (〜, U+301C), a similar but distinct punctuation mark used for ranges or emphasis, which may require IME conversion sequences like typing "namidasu" and selecting from candidates; the standard ASCII tilde (~, U+007E) is available via direct keyboard access or character maps when needed.[79] This distinction addresses cultural punctuation needs while maintaining compatibility with global standards.

Encoding Standards

In Unicode, the tilde is represented as the spacing character U+007E (~) within the Basic Latin block, serving as a basic punctuation and diacritical symbol.[80] The combining tilde, used to modify preceding characters for diacritical purposes such as nasalization in phonetic notations or tone marks in Vietnamese, is encoded as U+0303 (◌̃) in the Combining Diacritical Marks block.[81] Precomposed forms integrate the tilde directly, as seen in characters like Latin small letter n with tilde (ñ) at U+00F1 in the Latin-1 Supplement block, which decomposes to U+006E (n) followed by U+0303.[82] A related but distinct character is the wave dash at U+301C (〜), encoded in the CJK Symbols and Punctuation block as a compatibility ideograph from Japanese standards, often visually similar to a swung or elongated tilde. In Shift JIS encoding, prevalent for Japanese text, the byte sequence 0x8160 typically maps to U+301C, though compatibility decompositions and normalization processes may substitute it with U+007E (tilde) or U+FF5E (fullwidth tilde) to resolve display or interchange issues across systems.[83][84] In Unix-like operating systems, the tilde serves as a conventional suffix for backup files created by text editors during autosave operations; for instance, editing file.txt in Vim produces file.txt~ as the backup copy, preserving the original content in case of interruptions.[85] This practice, inherited from the vi editor, ensures non-interference with the primary file and is configurable via options like backupdir but defaults to the tilde appendage.[85] Microsoft Windows employs the tilde in short filename (8.3) generation for handling duplicates or long names under legacy DOS compatibility. When a long filename exceeds 8.3 limits or conflicts, the system truncates the base to six characters, appends a tilde followed by a numeric suffix (e.g., ~1 for the first duplicate), and limits the extension to three characters, facilitating backward compatibility with older applications.[86] This mechanism evolved from MS-DOS constraints, where filenames were strictly limited to eight characters before the dot and three after.[86]

Specialized and Miscellaneous Uses

Juggling and Notation Systems

Beyond juggling-specific notations, the tilde appears in music notation to indicate a trill, where a wavy line (often rendered as ~ over the note) directs performers to rapidly alternate between the principal note and the diatonic note above it, adding ornamental expressiveness typical in Baroque and classical compositions. This symbol, standardized since the 17th century, allows for subtle variations in speed and duration based on context, enhancing melodic flow without altering the core rhythm.[87] In dance choreography, the tilde is occasionally used in informal or text-based systems to symbolize wave-like body movements or fluid transitions, such as undulating arm or torso motions in contemporary or improvisational routines, distinguishing sharp from smooth gestures. Modern digital tools have extended the tilde's role into performative notations like sequence diagrams, where text-based languages such as PlantUML employ ~~ to format phrases like "long delay" with wave underlining, visually suggesting pauses, transitions, or rhythmic waves in workflow or timing representations. This adoption bridges traditional performative symbols with computational visualization, aiding in the design of interactive performances or animations.[88]

Cultural and Regional Variations

In internet meme and emoticon culture, particularly within anime and manga fandoms, the tilde has been integral to kaomoji (Japanese-style emoticons) since the late 1980s and 1990s, where it often represents wavy hair, a playful smirk, or emotional nuance in expressions like ~_^ for happiness or mischief.[89] These text-based faces emerged from early Japanese computer bulletin board systems and spread globally through online anime communities, emphasizing the tilde's role in conveying subtle, non-verbal tones without graphical images.[90] Regionally, the tilde influences Arabic script through the maddah (or maddah) diacritic, a tilde-like mark (◌ٓ) placed above the letter alif (آ) to denote a glottal stop followed by a prolonged /aː/ vowel sound, as seen in words like Allāh (الله).[91] This usage, part of the tashkīl system for Quranic recitation and classical texts, underscores the tilde's adaptation in Semitic languages to guide precise pronunciation in non-vocalized writing.[92] Artistically, the tilde serves decorative functions in typography and digital media, where its wavy form evokes fluidity or ornamentation, such as in layout separators or stylized motifs hinting at waves and curves.[93] In ASCII art, a text-only graphic tradition from the 1970s onward, tildes form undulating patterns to illustrate ocean waves or motion, as in simple representations like ~~~~~~~ for rippling water, enhancing visual storytelling in constrained environments like early email or forums.[94] Contemporary trends in hacker and maker subcultures highlight the tilde's symbolic role in digital identities, notably in usernames prefixed with ~ (e.g., ~user) on shared Unix-like servers, evoking home directories from 1980s-1990s multi-user systems. A prominent example is tilde.club, a public server founded in 2014 to foster collaborative coding and retro computing aesthetics, attracting over 1,000 users by emphasizing communal, text-based interaction over modern social platforms.[95] This revival positions the tilde as a badge of open-source ethos and nostalgic tech camaraderie.[96]

References

User Avatar
No comments yet.