In the Middle Ages, the tilde evolved into a specific diacritical mark in Spanish and Portuguese. In these languages, it indicated a nasal sound. In Spanish, the tilde is placed over the letter "n" (ñ) to form "eñe," representing a palatal nasal sound (as in "niño," meaning "child"). In Portuguese, the tilde is used over vowels to indicate nasalization, as in "não" (meaning "no") and "pão" (meaning "bread").
In mathematics and logic, the tilde has various meanings. In logic, it often denotes negation. For example, "~p" means "not p." In mathematics, it can indicate approximation or equivalence. For example, "π ≈ 3.14" might also be written as "π ~ 3.14."
The tilde has several uses in computer science. In Unix-based systems, the tilde represents a user's home directory. For example, "~" refers to the current user's home directory, and "~username" refers to the home directory of "username." It is used in some programming languages for bitwise NOT operations. For example, in C, "~x" flips the bits of the variable x.
In phonetics, the tilde is used to denote nasalization of vowels and consonants. In some languages, such as Estonian and Filipino, the tilde is used in dictionaries to represent the root of a word.