title: Star Trek II: The Wrath of Khan

text: The soundtrack was Horner's first major film score, and was written in four and a half weeks. The resulting 72 minutes of music was then performed by a 91-piece orchestra. Recording sessions for the score began on April 12, 1982 at the Warner Bros. lot, The Burbank Studios and continued until April 15. A pickup session was held on April 30 to record music for the Mutara nebula battle, while another session held on May 3 was used to cover the recently changed epilogue. Horner used synthesizers for ancillary effects; at the time, science fiction films such as "E.T. the Extra-Terrestrial" and "The Thing" were eschewing the synthesizer in favor of more traditional orchestras. Craig Huxley performed his invented instrument—the Blaster Beam—during recording, as well as composing and performing electronic music for the Genesis Project video. While most of the film was "locked in" by the time Horner had begun composing music, he had to change musical cue orchestration after the integration of special effects caused changes in scene durations.


title: Star Trek II: The Wrath of Khan

text: "The Wrath of Khan" features several recurring themes, including death, resurrection, and growing old. Upon writing his script, Meyer hit upon a link between Spock's death and the age of the characters. "This was going to be a story in which Spock died, so it was going to be a story about death, and it was only a short hop, skip, and a jump to realize that it was going to be about old age and friendship," Meyer said. "I don't think that any of [the other preliminary] scripts were about old age, friendship, and death." In keeping with the theme of death and rebirth symbolized by Spock's sacrifice and the Genesis Device, Meyer wanted to call the film "The Undiscovered Country", in reference to Prince Hamlet's description of death in William Shakespeare's "Hamlet", but the title was changed during editing without his knowledge. Meyer disliked "Wrath of Khan", but it was chosen because the preferred "Vengeance of Khan" conflicted with Lucasfilm's forthcoming "Revenge of the Jedi" (renamed "Return of the Jedi" late in production).


title: Star Trek II: The Wrath of Khan

text: Meyer added elements to reinforce the aging of the characters. Kirk's unhappiness about his birthday is compounded by McCoy's gift of reading glasses. The script stated that Kirk was 49, but Shatner was unsure about being specific about Kirk's age. Bennett remembers that Shatner was hesitant about portraying a middle-aged version of himself, and believed that with proper makeup he could continue playing a younger Kirk. Bennett convinced Shatner that he could age gracefully like Spencer Tracy; the producer did not know that Shatner had worked with Tracy on "Judgment at Nuremberg" (1961), and was fond of the actor. Meyer made sure to emphasize Kirk's parallel to Sherlock Holmes in that both characters waste away in the absence of their stimuli; new cases, in Holmes' case, and starship adventures in Kirk's.


title: Star Trek II: The Wrath of Khan

text: Khan's pursuit of Kirk is central to the film's theme of vengeance, and "The Wrath of Khan" deliberately borrows heavily from Herman Melville's "Moby-Dick". To make the parallels clear to viewers, Meyer added a visible copy of "Moby-Dick" to Khan's dwelling. Khan liberally paraphrases Ahab, with "I'll chase him round the moons of Nibia and round the Antares maelstrom and round perdition's flames before I give him up!". Khan quotes Ahab's tirade at the end of the novel verbatim with his final lines: "To the last I grapple with thee; from Hell's heart I stab at thee; for hate's sake, I spit my last breath at thee."


title: Star Trek II: The Wrath of Khan

text: The film's novelization, written by Vonda N. McIntyre, stayed on the "New York Times" paperback bestsellers list for more than three weeks. Unlike the previous film, "Wrath of Khan" was not promoted with a toy line, although Playmates Toys created Khan and Saavik figures in the 1990s, and in 2007 Art Asylum crafted a full series of action figures to mark the film's 25th anniversary. In 2009, IDW Publishing released a comic adaptation of the film, and "Film Score Monthly" released an expanded score.


title: Star Trek II: The Wrath of Khan

text: "The Wrath of Khan" opened on June 4, 1982 in 1,621 theaters in the United States. It made $14,347,221 in its opening weekend, at the time the largest opening weekend gross in history. It went on to earn $78,912,963 in the US, becoming the sixth highest-grossing film of 1982. It made $97,000,000 worldwide. Although the total gross of "The Wrath of Khan" was less than that of "The Motion Picture", it was more profitable due to its much lower production cost.


title: Star Trek II: The Wrath of Khan

text: Critical response was positive. Review aggregator Rotten Tomatoes reports that 86% of 73 critics have given the film a positive review, recording an average score of 8.1/10. After the lukewarm reaction to the first film, fan response to "The Wrath of Khan" was highly positive. The film's success was credited with renewing interest in the franchise. Mark Bernardin of "Entertainment Weekly" went further, calling "The Wrath of Khan" "the film that, by most accounts, saved "Star Trek" as we know it"; it is now considered one of the best films in the series. Pauline Kael of "The New Yorker" called the film "wonderful dumb fun." Gene Siskel gave the film three-and-a-half stars out of four, calling it "a flat-out winner, full of appealing characters in engaging relationships in a futuristic film that has a delightfully old-fashioned sense of majesty about its characters and the predicaments they get into."


title: Star Trek II: The Wrath of Khan

text: The film's pacing was praised by reviewers in "The New York Times" and "The Washington Post" as being much swifter than its predecessor and closer to that of the television series. Janet Maslin of "The New York Times" credited the film with a stronger story than "The Motion Picture" and stated the sequel was everything the first film should have been. "Variety" agreed that "The Wrath of Khan" was closer to the original spirit of "Star Trek" than its predecessor. Strong character interaction was cited as a strong feature of the film, as was Montalbán's portrayal of Khan. In 2016, "Playboy" ranked the film number four on its list of "15 Sequels That Are Way Better Than The Originals". "Popular Mechanics" would later rate Spock's death the tenth greatest scene in science fiction.


title: Star Trek II: The Wrath of Khan

text: Roger Ebert of the "Chicago Sun-Times" and Derek Adams of "Time Out" complained about what were seen as tepid battle sequences and perceived melodrama. While Ebert and "TV Guide" felt that Spock's death was dramatic and well-handled, "The Washington Post"s Gary Arnold stated Spock's death "feels like an unnecessary twist, and the filmmakers are obviously well-prepared to fudge in case the public demands another sequel". Negative reviews of the film focused on some of the acting, and "Empire" singled out the "dodgy coiffures" and "Santa Claus tunics" as elements of the film that had not aged well.


title: Star Trek II: The Wrath of Khan

text: Christopher John reviewed "Star Trek II: The Wrath of Khan" in "Ares Magazine" #13 and commented that "By not taking itself so seriously – that is, realizing the film should be an action adventure with elements of pathos and philosophy gently added – "The Wrath of Khan" succeeded brilliantly. For those who loved the series, it was a dream come true (to such an extent that many refuse to acknowledge the existence of the first film as part of the "Star Trek" epos)."


title: Star Trek II: The Wrath of Khan

text: "The Wrath of Khan" won two Saturn Awards in 1982, for best actor (Shatner) and best direction (Meyer). The film was also nominated in the "best dramatic presentation" category for the 1983 Hugo Awards, but lost to "Blade Runner". "The Wrath of Khan" has influenced later movies: Meyer's rejected title for the film, "The Undiscovered Country", was finally put to use when Meyer directed the , which retained the nautical influences. Director Bryan Singer cited the film as an influence on "X2" and his abandoned sequel to "Superman Returns". The film is also a favorite of director J. J. Abrams, producer Damon Lindelof, and writers Roberto Orci and Alex Kurtzman, the creative team behind the franchise relaunch film "Star Trek". Abrams' second entry in the relaunched film series, "Star Trek Into Darkness", drew significantly from "Wrath of Khan".


title: Star Trek II: The Wrath of Khan

text: Paramount released "The Wrath of Khan" on RCA CED Videodisc in 1982 and on VHS and Betamax in 1983. The studio sold the VHS for $39.95, $40 below contemporary movie cassette prices and it sold a record 120,000 copies. The successful experiment was credited with instigating more competitive VHS pricing, an increase in the adoption of increasingly cheaper VHS players, and an industry-wide move away from rentals to sales as the bulk of videotape revenue.


title: Star Trek II: The Wrath of Khan

text: Paramount released "The Wrath of Khan" on DVD in 2000; no special features were included on the disc. Montalbán drew hundreds of fans of the film to Universal City, California where he signed copies of the DVD to commemorate its release. In August 2002, the film was re-released in a highly anticipated two-disc "Director's Edition" format. In addition to remastered picture quality and 5.1 Dolby surround sound, the DVD set included director commentary, cast interviews, storyboards and the theatrical trailer. The expanded cut of the film was given a Hollywood premiere before the release of the DVD. Meyer stated that he didn't believe directors' cuts of films were necessarily better than the original but that the re-release gave him a chance to add elements that had been removed from the theatrical release by Paramount. The four hours of bonus content and expanded director's cut were favorably received.


title: Star Trek II: The Wrath of Khan

text: The film's original theatrical cut was released on Blu-ray Disc in May 2009 to coincide with the new "Star Trek" feature, along with the other five films featuring the original crew in "Star Trek: Original Motion Picture Collection". Of all six original films, "Wrath of Khan" was the only one to be remastered in 1080p high-definition from the original negative. Nicholas Meyer stated that the "Wrath of Khan" negative "was in terrible shape," which is why it needed extensive restoration. All six films in the set have new 7.1 Dolby TrueHD audio. The disc also features a new commentary track by director Nicholas Meyer and "" showrunner Manny Coto. On April 24, 2016, Paramount Pictures announced the Director's Edition of the film would be released for Blu-ray Disc on June 7, 2016. On July 7, 2021, it was announced that the first four films in the "Star Trek" franchise (including both the theatrical cut and the Director's Edition of "The Wrath of Khan") would be released on 4K Ultra HD Blu-ray on September 7 of that year to commemorate the franchise's 55th anniversary, alongside individual remastered Blu-rays of the same films.


title: Plague of Justinian

text: The plague of Justinian or Justinianic plague (541–549 AD) was the first recorded major outbreak of the first plague pandemic, the first Old World pandemic of plague, the contagious disease caused by the bacterium "Yersinia pestis". The disease afflicted the entire Mediterranean Basin, Europe, and the Near East, severely affecting the Sasanian Empire and the Byzantine Empire and especially Constantinople. The plague is named for the Byzantine Emperor Justinian I (r. 527–565) who according to his court historian Procopius contracted the disease and recovered in 542, at the height of the epidemic which killed about a fifth of the population in the imperial capital. The contagion arrived in Roman Egypt in 541, spread around the Mediterranean Sea until 544, and persisted in Northern Europe and the Arabian Peninsula, until 549.


title: Plague of Justinian

text: In 2013, researchers confirmed earlier speculation that the cause of the plague of Justinian was "Yersinia pestis", the same bacterium responsible for the Black Death (1346-1353). Ancient and modern "Yersinia pestis" strains closely related to the ancestor of the Justinian plague strain have been found in the Tian Shan, a system of mountain ranges on the borders of Kyrgyzstan, Kazakhstan, and China, suggesting that the Justinian plague originated in or near that region.


title: Plague of Justinian

text: The Byzantine historian Procopius first reported the epidemic in 541 from the port of Pelusium, near Suez in Egypt. Two other first hand reports of the plague's ravages were by the Syriac church historian John of Ephesus and Evagrius Scholasticus, who was a child in Antioch at the time and later became a church historian. Evagrius was afflicted with the buboes associated with the disease but survived. During the disease's four returns in his lifetime, he lost his wife, a daughter and her child, other children, most of his servants and people from his country estate.


title: Plague of Justinian

text: According to contemporary sources, the outbreak in Constantinople was thought to have been carried to the city by infected rats on grain ships arriving from Egypt. To feed its citizens, the city and outlying communities imported large amounts of grain, mostly from Egypt. The rat (and flea) population in Egypt thrived on feeding from the large granaries maintained by the government.


title: Plague of Justinian

text: Procopius, in a passage closely modelled on Thucydides, recorded that at its peak the plague was killing 10,000 people in Constantinople daily, but the accuracy of the figure is in question, and the true number will probably never be known. He noted that because there was no room to bury the dead, bodies were left stacked in the open. Funeral rites were often left unattended to, and the entire city smelled like the dead. In his "Secret History," he records the devastation in the countryside and reports the ruthless response by the hard-pressed Justinian:


title: Plague of Justinian

text: When pestilence swept through the whole known world and notably the Roman Empire, wiping out most of the farming community and of necessity leaving a trail of desolation in its wake, Justinian showed no mercy towards the ruined freeholders. Even then, he did not refrain from demanding the annual tax, not only the amount at which he assessed each individual, but also the amount for which his deceased neighbors were liable.


title: Plague of Justinian

text: As a result of the plague in the countryside, farmers could not take care of crops and the price of grain rose in Constantinople. Justinian had expended huge amounts of money for wars against the Vandals in the region of Carthage and the Ostrogoths' kingdom in Italy. He had invested heavily in the construction of great churches, such as Hagia Sophia. As the empire tried to fund the projects, the plague caused tax revenues to decline through the massive number of deaths and the disruption of agriculture and trade. Justinian swiftly enacted new legislation to deal more efficiently with the glut of inheritance suits being brought as a result of victims dying intestate.


title: Plague of Justinian

text: The plague's long-term effects on European and Christian history were enormous. As the disease spread to port cities around the Mediterranean, the struggling Goths were reinvigorated and their conflict with Constantinople entered a new phase. The plague weakened the Byzantine Empire at a critical point, when Justinian's armies had nearly retaken all of Italy and the western Mediterranean coast; the evolving conquest would have reunited the core of the Western Roman Empire with the Eastern Roman Empire. Although the conquest occurred in 554, the reunification did not last long. In 568, the Lombards invaded Northern Italy, defeated the small Byzantine army that had been left behind and established the Kingdom of the Lombards. Gaul is known to have suffered severely; by virtue of its proximity it is unlikely that Britain escaped, although historical records of 6th century Britain are extremely poor, so there are no unequivocal attestations of the plague reaching the islands.


title: Plague of Justinian

text: The Plague of Justinian is the first and the best known outbreak of the first plague pandemic, which continued to recur until the middle of the 8th century. Some historians believe the first plague pandemic was one of the deadliest pandemics in history, resulting in the deaths of an estimated 15–100 million people during two centuries of recurrence, a death toll equivalent to 25–60% of Europe's population at the time of the first outbreak. Research published in 2019 argued that the two-hundred-year-long pandemic's death toll and social effects have been exaggerated, comparing it to the modern third plague pandemic (1855–1960s).


title: Plague of Justinian

text: The Plague of Justinian is generally regarded as the first historically recorded epidemic of "Yersinia pestis". This conclusion is based on historical descriptions of the clinical manifestations of the disease and the detection of "Y. pestis" DNA from human remains at ancient grave sites dated to that period.


title: Plague of Justinian

text: Genetic studies of modern and ancient "Yersinia pestis" DNA suggest that the origin of the Justinian plague was in Central Asia. The most basal or root level existing strains of the "Yersinia pestis" as a whole species are found in Qinghai, China. Other scholars contest that, rather than Central Asia, the specific strain that composed the Justinian plague began in Subsaharan-Africa, and that the plague was spread to the Mediterranean by merchants from the Kingdom of Aksum in East Africa. This point of origin aligns more with the general South-North spread of the disease from Egypt into the rest of the Mediterranean world. It also explains why Sassanid Persia saw a later development of the outbreak despite stronger trade links with Central Asia. After samples of DNA from "Yersinia pestis" were isolated from skeletons of Justinian plague victims in Germany, it was found that modern strains currently found in the Tian Shan mountain range system are most basal known in comparison with the Justinian plague strain. Additionally, a skeleton found in Tian Shan dating to around 180 AD and identified as an "early Hun" was found to contain DNA from "Yersinia pestis" closely related to the Tian Shan strain basal ancestor of the Justinian plague strain German samples. This finding suggests that the expansion of nomadic peoples who moved across the Eurasian steppe, such as the Xiongnu and the later Huns, had a role in spreading plague to West Eurasia from an origin in Central Asia.


title: Plague of Justinian

text: Earlier samples of "Yersinia pestis" DNA have been found in skeletons dating from 3000 to 800 BC, across West and East Eurasia. The strain of "Yersinia pestis" responsible for the Black Death, the devastating pandemic of bubonic plague, does not appear to be a direct descendant of the Justinian plague strain. However, the spread of Justinian plague may have caused the evolutionary radiation that gave rise to the currently extant 0ANT.1 clade of strains.


title: Plague of Justinian

text: The number of deaths is uncertain. Some modern scholars believe that the plague killed up to 5,000 people per day in Constantinople at the peak of the pandemic. According to one view, the initial plague ultimately killed perhaps 40% of the city's inhabitants and caused the deaths of up to a quarter of the human population of the Eastern Mediterranean. Frequent subsequent waves of the plague continued to strike throughout the 6th, 7th and 8th centuries, with the disease becoming more localized and less virulent.


title: Plague of Justinian

text: A revisionist view expressed by scholars such as Lee Mordechai and Merle Eisenberg argues that the mortality of the Justinian Plague was far lower than previously believed. They say that the plague might have caused high mortality in specific places, but it did not cause widespread demographic decline or decimate Mediterranean populations. According to them, any direct mid-to-long term effects of plague were minor. However, their position has been the subject of a concerted critique by Peter Sarris in the journal Past and Present, where he challenges both their core methodology and their handling of the sources (P. Sarris ‘New Approaches to the Plague of Justinian’, Past and Present advanced access 13 November 2021). Sarris also provides up-to-date discussion of the genetic evidence, including the suggestion that the plague may have entered Western Eurasia via more than one route, with it possibly having struck England before Constantinople (based on the important discovery of plague victims at an early Anglo-Saxon burial site at Edix Hill near Cambridge).


title: Arabic script

text: 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 the third-most by number of users (after the Latin and Chinese scripts).


title: Arabic script

text: The script was first used to write texts in Arabic, most notably the Quran, the holy book of Islam. With the religion's spread, it came to be used as the primary script for many language families, leading to the addition of new letters and other symbols. Such languages still using it are: Persian (Farsi/Dari), Malay (Jawi), Uyghur, Kurdish, Punjabi (Shahmukhi), Sindhi, Balti, Balochi, Pashto, Lurish, Urdu, Kashmiri, Rohingya, Somali and Mandinka, Mooré among others. Until the 16th century, it was also used for some Spanish texts, and—prior to the language reform in 1928—it was the writing system of Turkish.


title: Arabic script

text: The script is written from right to left in a cursive style, in which most of the letters are written in slightly different forms according to whether they stand alone or are joined to a following or preceding letter. However, the basic letter form remains unchanged. The script does not have capital letters. In most cases, the letters transcribe consonants, or consonants and a few vowels, so most Arabic alphabets are abjads, with the versions used for some languages, such as Sorani, Uyghur, Mandarin, and Serbo-Croatian, being alphabets. It is also the basis for the tradition of Arabic calligraphy.


title: Arabic script

text: The Arabic alphabet is derived either from the Nabataean alphabet or (less widely believed) directly from the Syriac alphabet, which are both derived from the Aramaic alphabet (which also gave rise to the Hebrew alphabet), which, in turn, descended from the Phoenician alphabet. In addition to the Aramaic script (and, therefore, the Arabic and Hebrew scripts), the Phoenician script also gave rise to the Greek alphabet (and, therefore, both the Cyrillic alphabet and the Latin alphabet used to write this article).


title: Arabic script

text: In the 6th and 5th centuries BCE, northern Arab tribes emigrated and founded a kingdom centred around Petra, Jordan. These people (now named Nabataeans from the name of one of the tribes, Nabatu) spoke Nabataean Arabic, a dialect of the Arabic language. In the 2nd or 1st centuries BCE, the first known records of the Nabataean alphabet were written in the Aramaic language (which was the language of communication and trade), but included some Arabic language features: the Nabataeans did not write the language which they spoke. They wrote in a form of the Aramaic alphabet, which continued to evolve; it separated into two forms: one intended for inscriptions (known as "monumental Nabataean") and the other, more cursive and hurriedly written and with joined letters, for writing on papyrus. This cursive form influenced the monumental form more and more and gradually changed into the Arabic alphabet.


title: Arabic script

text: The Arabic script has been adapted for use in a wide variety of languages besides Arabic, including Persian, Malay and Urdu, which are not Semitic. Such adaptations may feature altered or new characters to represent phonemes that do not appear in Arabic phonology. For example, the Arabic language lacks a voiceless bilabial plosive (the sound), therefore many languages add their own letter to represent in the script, though the specific letter used varies from language to language. These modifications tend to fall into groups: Indian and Turkic languages written in the Arabic script tend to use the Persian modified letters, whereas the languages of Indonesia tend to imitate those of Jawi. The modified version of the Arabic script originally devised for use with Persian is known as the Perso-Arabic script by scholars.


title: Arabic script

text: When the Arabic script is used to write Serbo-Croatian, Sorani, Kashmiri, Mandarin Chinese, or Uyghur, vowels are mandatory. The Arabic script can, therefore, be used as a true alphabet as well as an abjad, although it is often strongly, if erroneously, connected to the latter due to it being originally used only for Arabic.


title: Arabic script

text: Use of the Arabic script in West African languages, especially in the Sahel, developed with the spread of Islam. To a certain degree the style and usage tends to follow those of the Maghreb (for instance the position of the dots in the letters "" and ""). Additional diacritics have come into use to facilitate the writing of sounds not represented in the Arabic language. The term "", which comes from the Arabic root for "foreign," has been applied to Arabic-based orthographies of African languages.


title: Arabic script

text: Today Iran, Afghanistan, Pakistan, India, and China are the main non-Arabic speaking states using the Arabic alphabet to write one or more official national languages, including Azerbaijani, Baluchi, Brahui, Persian, Pashto, Central Kurdish, Urdu, Sindhi, Kashmiri, Punjabi and Uyghur.


title: Arabic script

text: With the establishment of Muslim rule in the subcontinent, one or more forms of the Arabic script were incorporated among the assortment of scripts used for writing native languages. In the 20th century, the Arabic script was generally replaced by the Latin alphabet in the Balkans, parts of Sub-Saharan Africa, and Southeast Asia, while in the Soviet Union, after a brief period of Latinisation, use of Cyrillic was mandated. Turkey changed to the Latin alphabet in 1928 as part of an internal Westernizing revolution. After the collapse of the Soviet Union in 1991, many of the Turkic languages of the ex-USSR attempted to follow Turkey's lead and convert to a Turkish-style Latin alphabet. However, renewed use of the Arabic alphabet has occurred to a limited extent in Tajikistan, whose language's close resemblance to Persian allows direct use of publications from Afghanistan and Iran.


title: Arabic script

text: Most languages that use alphabets based on the Arabic alphabet use the same base shapes. Most additional letters in languages that use alphabets based on the Arabic alphabet are built by adding (or removing) diacritics to existing Arabic letters. Some stylistic variants in Arabic have distinct meanings in other languages. For example, variant forms of "kāf" are used in some languages and sometimes have specific usages. In Urdu and some neighbouring languages, the letter Hā has diverged into two forms "dō-čašmī hē" and "gōl hē". While a variant form of "yā" referred to as "baṛī yē" is used at the end of some words.


title: Hell in a Cell (2022)

text: The 2022 Hell in a Cell was the 14th annual Hell in a Cell professional wrestling pay-per-view and livestreaming event produced by WWE. It was held for wrestlers from the promotion's Raw and SmackDown brand divisions. The event took place on June 5, 2022, at the Allstate Arena in the Chicago suburb of Rosemont, Illinois.


title: Hell in a Cell (2022)

text: Seven matches were contested at the event. In the main event, Cody Rhodes defeated Seth "Freakin" Rollins in a Hell in a Cell match. In other prominent matches, The Judgment Day (Edge, Damian Priest, and Rhea Ripley) defeated AJ Styles, Finn Bálor, and Liv Morgan in a six-person mixed tag team match, Bobby Lashley defeated Omos and MVP in a 2-on-1 handicap match, and in the opening bout, Bianca Belair defeated Asuka and Becky Lynch in a triple threat match to retain the Raw Women's Championship.


title: Hell in a Cell (2022)

text: The event was met with positive reviews from critics, with the main event receiving universal acclaim. Rhodes and Rollins were praised for their performances but fans and critics especially praised Rhodes' efforts in competing inside Hell in a Cell even though he was injured.


title: Hell in a Cell (2022)

text: Hell in a Cell is a gimmick event produced annually by WWE since 2009. The concept of the show comes from the promotion's established Hell in a Cell match, in which competitors fight inside a 20-foot-high roofed cell structure surrounding the ring and ringside area. The main event match of the card is contested under the Hell in a Cell stipulation. The 2022 event was the 14th event under the Hell in a Cell chronology and featured wrestlers from the Raw and SmackDown brands. With the exception of the September 2018 event, Hell in a Cell had been held in October. The 2021 event, however, moved the event series up to June, with the 2022 event scheduled for June 5 at the Allstate Arena in the Chicago suburb of Rosemont, Illinois. It aired on pay-per-view (PPV) worldwide and the livestreaming services Peacock in the United States and the WWE Network in international markets.


title: Hell in a Cell (2022)

text: The show included matches that resulted from scripted storylines, where wrestlers portrayed heroes, villains, or less distinguishable characters in scripted events that built tension and culminated in a wrestling match or series of matches. Results were predetermined by WWE's writers on the Raw and SmackDown brands, while storylines were produced on WWE's weekly television shows, "Monday Night Raw" and "Friday Night SmackDown".


title: Hell in a Cell (2022)

text: After defeating Seth "Freakin" Rollins at both WrestleMania 38 and WrestleMania Backlash, Cody Rhodes was granted a United States Championship match against Theory on the May 9 episode of "Raw". However, during the match, Rollins attacked Rhodes, costing Rhodes the title. The following week, Rhodes challenged Rollins to another match, this time inside Hell in a Cell, which Rollins accepted.


title: Hell in a Cell (2022)

text: At WrestleMania 38, Bianca Belair defeated Becky Lynch to win the Raw Women's Championship. On the April 25 episode of "Raw", Lynch wanted a rematch, but Asuka interrupted, making a surprise return after nine months of inactivity due to injury. WWE official Adam Pearce gave Asuka a chance to face Belair in a championship contender's match on the May 9 episode; however, the match ended in a no contest after Lynch attacked both competitors. The following week, Asuka defeated Lynch to earn the right to face Belair for the Raw Women's Championship at Hell in a Cell. (This was originally supposed to be a six-pack challenge also involving Doudrop, Nikki A.S.H., and WWE Women's Tag Team Champions Sasha Banks and Naomi, but got changed when Banks and Naomi walked out before "Raw" due to legitimate creative frustrations.) On the May 23 episode, Lynch was given another chance to face Asuka with the added stipulation that if Lynch won, she would be added to the championship match at Hell in a Cell. Lynch defeated Asuka, turning the bout into a triple threat match.


title: Hell in a Cell (2022)

text: At WrestleMania 38, Bobby Lashley defeated Omos. The following night on "Raw", Lashley's manager, MVP, turned on Lashley and aligned with Omos, who then defeated Lashley at WrestleMania Backlash with the help of MVP. On the May 16 episode of "Raw", Lashley defeated Omos again, this time in a Steel Cage match when Omos threw Lashley through the cage allowing him to win by walking out of the cage. The following week, with Lashley wanting to put an end to their rivalry, he challenged MVP to a match where the winner would choose the stipulation of his match against Omos at Hell in a Cell. With the help of Omos, MVP defeated Lashley by countout. Omos and MVP decided that the stipulation at Hell in a Cell would be a 2-on-1 handicap match with Omos and MVP facing Lashley.


title: Hell in a Cell (2022)

text: The event opened with Bianca Belair defending the Raw Women's Championship against Asuka and Becky Lynch in a triple threat match. Asuka caught Belair in an Armbar, but Belair countered and slammed her onto the top turnbuckle. Lynch performed a Natural Selection on Belair. Lynch performed a Top Rope Leg Drop on Belair, but Asuka broke up the pin. Belair slammed Asuka onto Lynch and performed a handspring into a Standing Moonsault onto both for a nearfall. Asuka hit a Codebreaker on Belair and then caught Lynch off the ropes into another Codebreaker for a nearfall on both. Asuka placed both in a Double Ankle Lock, but both made it to the ropes. Lynch hit the Manhandle Slam on Belair, but Asuka broke up the pin. In the end, Lynch threw Belair out of the ring and hit a second Manhandle Slam on Asuka. Belair returned to throw Lynch out of the ring and pinned Asuka to retain the title.


title: Hell in a Cell (2022)

text: Next, Bobby Lashley took on Omos and MVP in a 2-on-1 handicap match. In the end, MVP drove Lashley out of the ring with the Player's Boot. Omos tackled Lashley through the barricade, but Lashley made it back into the ring at nine. Cedric Alexander came out and entered the ring, but was thrown out by Omos. That distraction from Alexander allowed Lashley to hit a Spear on Omos and force MVP to submit to the Hurt Lock to win the match.


title: Hell in a Cell (2022)

text: Then, Ezekiel took on Kevin Owens. Owens performed a Tornado DDT for a nearfall. Owens went for a Swanton, but Ezekiel got his knees up. Owens hit a Pop-Up Powerbomb for a nearfall. Ezekiel went up top, but Owens crotched him on the ropes. Owens knocked Ezekiel off the ropes and then hit a Cannonball in the corner. Owens hit a Stunner on Ezekiel to win the match.


title: Hell in a Cell (2022)

text: In the fourth match, AJ Styles, Finn Bálor, and Liv Morgan took on The Judgment Day (Edge, Damian Priest, and Rhea Ripley) in a six-person mixed tag team match. The two teams brawled in the ring to start. Judgment Day spent most of the match neutralizing Bálor from his teammates. Styles eventually tagged in and hit Edge with a Phenomenal Forearm, but Priest pulled Styles out of the ring on the pin. Ripley attempted the Riptide, but Morgan reversed and hit a DDT. Bálor attempted the Coup de Grâce on Priest, but Ripley crotched Bálor on the top rope. Priest hit a South of Heaven Chokeslam on Bálor, but was caught with a Phenomenal Forearm from Styles. Edge threw Styles into the ring post as Bálor again attempted the Coup de Grâce, but Ripley stepped in to stop it. After Morgan took out Ripley, Bálor missed the Coup de Grâce as Edge moved and then hit a Spear on Bálor to win the match for The Judgment Day.


title: Hell in a Cell (2022)

text: Next, Madcap Moss took on Happy Corbin in a No Holds Barred match. This was the only match from "SmackDown" that was contested at the event. Corbin beat Moss down with a steel chair, but Moss took control and returned the favor. Moss hit a DDT to Corbin for a nearfall. On the outside, Corbin ran and hit a huge Chop Block on Moss. Corbin placed the chair around Moss' neck and slammed him into the announce table. Moss hit a Fallaway Slam to Corbin into steel steps that was set up in the corner and then hit the Punchline. Moss placed Corbin's neck in a steel chair and slammed the steps onto the chair and pinned Corbin to win the match.


title: Hell in a Cell (2022)

text: In the penultimate match, Theory defended the United States Championship against Mustafa Ali. Ali went for a 450 splash, but Theory rolled out of the way and Ali hurt his knee. Theory chop blocked the bad knee and hit Ali with the ATL to retain the title.


title: Hell in a Cell (2022)

text: The main event saw Cody Rhodes take on Seth "Freakin" Rollins in a Hell in a Cell match. Rollins came out in polka dot themed attire to mock Rhodes' father, Dusty, while Rhodes competed in the match with a completely torn pectoral muscle. Rhodes hit Rollins with the Disaster Kick and the Cody Cutter on Rollins early. Rhodes locked in the Figure-Four Leglock on Rollins, but let go after Rollins refused to let go of the bottom rope. Rollins threw Rhodes into the cell wall multiple times with the injured shoulder. Rollins attacked the injured shoulder using the steel steps. Rollins pulled out a polka dot weight belt to lash Rhodes in the injured shoulder. Rollins attempted a Frog Splash, but Rhodes moved and Rollins crashed through a table. Rhodes pulled a bull rope out from under the ring and both he and Seth attached themselves to it. Rhodes struck Rollins in the head with a cowbell for a nearfall. Rollins used the rope to slam Rhodes' shoulder first into the ring post. Rhodes executed a Cross Rhodes on Rollins for a nearfall. Rollins performed a Buckle Bomb to Rhodes through a table for a nearfall. Rollins pulled a sledgehammer out from beneath the ring, but Rhodes was able to avoid being hit. Rhodes landed a Pedigree on Rollins for a nearfall. Rollins hit Rhodes with Cross Rhodes, but Rhodes was able to hit his own. Rollins hit the Stomp for a nearfall. Rhodes performed the Cross Rhodes twice on Rollins before hitting the latter with the sledgehammer to win the match.


title: Hell in a Cell (2022)

text: The event received mainly positive reviews, with the main event receiving worldwide acclaim for Rhodes' dedication along with his and Rollins' performances. It was reported by WWE on Twitter that the event was the most-watched Hell in a Cell in WWE history. Dave Meltzer of the "Wrestling Observer Newsletter" rated the main event between Seth Rollins and Cody Rhodes five stars, which makes this match the first on the WWE main roster since 2011 to receive such a rating.


title: Hell in a Cell (2022)

text: Cody Rhodes opened the following night's episode of "Raw" and said that he was finally done with Seth "Freakin" Rollins. Despite having an appointment to have surgery for his torn pectoral muscle that Thursday, he hinted at winning the Money in the Bank ladder match at the upcoming Money in the Bank event. Rollins then interrupted and said that he still did not like Rhodes, but Rhodes earned his respect. Rollins left the ring, but while Rhodes was making his exit, Rollins attacked Rhodes from behind with a sledgehammer and continued to attack Rhodes until separated by referees and WWE officials.


title: Hell in a Cell (2022)

text: The Judgment Day (Edge, Damian Priest, and Rhea Ripley) boasted about their victory over AJ Styles, Finn Bálor, and Liv Morgan. Ripley said they were destined for victory and that she would win the fatal four-way match that night, also involving Morgan, and go on to Money in the Bank to win the Raw Women's Championship. Edge said they would be adding a new member to the group, who was revealed as Bálor. Bálor said he was tired of being someone he did not want to be and saw The Judgment Day as a way to advance his own career. Bálor, along with Priest and Ripley, then turned on Edge and attacked him, hitting him with a "Con-chair-to". Later that night, Ripley won the fatal four-way match by pinning Doudrop to face Bianca Belair for the Raw Women's Championship at Money in the Bank.


title: Hell in a Cell (2022)

text: Ezekiel admitted that he came up short in his match against Kevin Owens. He then challenged Owens to a rematch the following week. Owens agreed only if Ezekiel admitted that he was actually Elias. Ezekiel did and, after Owens agreed to the match, then revealed he was lying before attacking Owens.


title: Hell in a Cell (2022)

text: Happy Corbin and Madcap Moss would have another match on the June 17 episode of "SmackDown", this time as a "Last Laugh" match, which was won by Madcap Moss, thus ending their feud.


title: Unicorn (finance)

text: In business, a unicorn is a privately held startup company valued at over US$1 billion. The term was first published in 2013, coined by venture capitalist Aileen Lee, choosing the mythical animal to represent the statistical rarity of such successful ventures.


title: Unicorn (finance)

text: CB Insights identified 1,170 unicorns worldwide . Unicorns with over $10 billion in valuation have been designated as "decacorn" companies. For private companies valued over $100 billion, the terms "centicorn", "hectocorn", and "super-unicorn" have been used. The term "kilocorn" has been used for companies valued at $1 trillion, of which Apple was the first.


title: Unicorn (finance)

text: Aileen Lee originated the term "unicorn" in a 2013 "TechCrunch" article, "Welcome To The Unicorn Club: Learning from Billion-Dollar Startups". At the time, 39 companies were identified as unicorns. In a different study done by "Harvard Business Review", it was determined that startups founded between 2012 and 2015 were growing in valuation twice as fast as companies from startups founded between 2000 and 2013.


title: Unicorn (finance)

text: In 2018, 16 U.S. companies became unicorns, resulting in 119 private companies worldwide valued at $1 billion or more.


title: Unicorn (finance)

text: Globally, according to CB Insights, there were more than 803 unicorns , with ByteDance, SpaceX and Stripe among the largest, and 30 decacorns, including SpaceX, Getir, Goto, J&T Express, Stripe, and Klarna.


title: Unicorn (finance)

text: The surge of unicorns was reported as "meteoric" for 2021, with $71 billion invested in 340 new companies, a banner year for startups and for the US venture capital industry; the unprecedented number of companies valued at more than $1 billion during 2021 exceeded the sum total of the five previous year. Six months later, in June 2022, 1,170, total unicorns were reported.


title: Unicorn (finance)

text: During the mid-2000s, investors and venture capital firms were adopting the first-mover advantage and get big fast (GBF) strategies for startups, also known by the neologism, "blitzscaling". GBF is a strategy where a startup tries to expand at a high rate through large funding rounds and price cutting to gain an advantage on market share and push away rival competitors as fast as possible. The rapid returns through this strategy seem to be attractive to all parties involved, despite the cautionary note of the dot-com bubble of 2000, as well as a lack of long-term sustainability in value creation of emerging companies of the Internet age.


title: Unicorn (finance)

text: Many unicorns were created through buyouts from large public companies. In a low-interest-rate and slow-growth environment, many companies like Apple, Meta, and Google focus on acquisitions instead of focusing on capital expenditures and development of internal investment projects. Some large companies would rather bolster their businesses through buying out established technology and business models rather than creating it themselves.


title: Unicorn (finance)

text: The average age of a technology company before it goes public is 11 years, as opposed to an average life of four years back in 1999. This new dynamic stems from the increased amount of private capital available to unicorns and the passing of the U.S.'s Jumpstart Our Business Startups (JOBS) Act in 2012, which increased by a factor of four the number of shareholders a company can have before it has to disclose its financials publicly. The amount of private capital invested in software companies has increased three-fold from 2013 to 2015.


title: Unicorn (finance)

text: Through many funding rounds, companies do not need to go through an initial public offering (IPO) to obtain a capital or a higher valuation; they can just go back to their investors for more capital. IPOs also run the risk of devaluation of a company if the public market thinks a company is worth less than its investors. A few recent examples of this situation were Square, best known for its mobile payments and financial services business, and Trivago, a popular German hotel search engine, both of which were priced below their initial offer prices by the market. This was because of the severe over-valuation of both companies in the private market by investors and venture capital firms. The market did not agree with both companies' valuations, and therefore, dropped the price of each stock from their initial IPO range.


title: Unicorn (finance)

text: Investors and startups may choose to avoid an IPO due to increased regulations. Regulations like the Sarbanes–Oxley Act have implemented more stringent regulations following several bankruptcy cases in the U.S. market that many of these companies want to avoid.


title: Unicorn (finance)

text: Startups have capitalized on the rapid growth of new technology to obtain unicorn status. With the advent of social media and access to millions utilizing this technology to gain massive economies of scale, startups have the ability to expand their business faster than ever. New innovations in technology including mobile smartphones, P2P platforms, and cloud computing with the combination of social media applications has aided in the growth of unicorns.


title: Unicorn (finance)

text: The valuations that designate start-up companies as unicorns and decacorns differ more established companies. A valuation for an established company stems from past years' performances, while a start-up company's valuation is derived from its growth opportunities and its expected development in the long-term for its potential market. Valuations for unicorns usually result from funding rounds of large venture capital firms investing in a start-up company. Another significant final valuation of start-ups is when a much larger company buys out a company, giving it that valuation; some examples are Unilever buying Dollar Shave Club and Facebook buying Instagram for $1 billion each, effectively turning Dollar Shave Club and Instagram into unicorns.


title: Unicorn (finance)

text: Bill Gurley, a partner at venture capital firm Benchmark, predicted in March 2015 and earlier that the rapid increase in the number of unicorns may "have moved into a world that is both speculative and unsustainable", that will leave in its wake what he terms "dead unicorns". Also he said that the main reason of unicorns' valuation is the "excessive amount of money" available for them. Similarly, in 2015 William Danoff, who manages the Fidelity Contrafund, said unicorns might be "going to lose a bit of luster" due to their more frequent occurrence and several cases of their stock price being devalued. Research by Stanford professors published in 2018 suggests that unicorns are overvalued by an average of 48%.


title: Unicorn (finance)

text: For high-growth companies looking for the highest valuations possible, it comes down to potential and opportunity. When investors of high-growth companies are deciding on whether they should invest in a company or not, they look for signs of a home run to make exponential returns on their investment along with the right personality that fits the company. To give such high valuations in funding rounds, venture capital firms have to believe in the vision of both the entrepreneur and the company as a whole. They have to believe the company can evolve from its unstable, uncertain present standing into a company that can generate and sustain moderate growth in the future.


title: Unicorn (finance)

text: To judge the potential future growth of a company, there needs to be an in-depth analysis of the target market. When a company or investor determines its market size, there are a few steps they need to consider to figure out how large the market really is:


title: Unicorn (finance)

text: After the market is reasonably estimated, a financial forecast can be made based on the size of the market and how much a company thinks it can grow in a certain time period.


title: Unicorn (finance)

text: To properly judge the valuation of a company after the revenue forecast is completed, a forecast of the operating margin, analysis of needed capital investments, and return on invested capital needs to be completed to judge the growth and potential return to investors of a company. Assumptions of where a company can grow to needs to be realistic, especially when trying to get venture capital firms to give the valuation a company wants. Venture capitalists know the payout on their investment will not be realized for another five to ten years, and they want to make sure from the start that financial forecasts are realistic.


title: Unicorn (finance)

text: With the financial forecasts set, investors need to know what the company should be valued in the present day. This is where more established valuation methods become more relevant.


title: Unicorn (finance)

text: Investors can derive a final valuation from these methods and the amount of capital they offer for a percentage of equity within a company becomes the final valuation for a startup. Competitor financials and past transactions also play an important part when providing a basis for valuing a startup and finding a correct valuation for these companies.


title: Unicorn (finance)

text: The sharing economy, also known as "collaborative consumption" or "on-demand economy", is based on the concept of sharing personal resources. This trend of sharing resources has made three of the top five largest unicorns (Uber, DiDi, and Airbnb) become the most valuable startups in the world. The economic trends of the 2010s powered consumers to learn to be more conservative with spending and the sharing economy reflected this.


title: Unicorn (finance)

text: E-commerce and the innovation of the online marketplace have been slowly taking over the needs for physical locations of store brands. A prime example of this is the decline of malls within the United States, the sales of which declined from $87.46 billion in 2005 to $60.65 billion in 2015. The emergence of e-commerce companies like Amazon and Alibaba (both unicorns before they went public) has decreased the need for physical locations to buy consumer goods. Many large corporations have seen this trend for a while and have tried to adapt to the e-commerce trend. Walmart in 2016 bought Jet.com, an American e-commerce company, for $3.3 billion to try to adapt to consumer preferences.


title: Unicorn (finance)

text: In support of the sharing economy, unicorns and successful startups have built an operating model defined as "network orchestrators". In this business model, there is a network of peers creating value through interaction and sharing. Network orchestrators may sell products/services, collaborate, share reviews, and build relations through their businesses. Examples of network orchestrators include all sharing economy companies (i.e. Uber, Airbnb), companies that let consumers share information (i.e. TripAdvisor, Yelp), and peer-to-peer or business-to-person selling platforms (i.e. Amazon, Alibaba).


title: Unicorn (finance)

text: The categorization of startups as unicorns has not been without criticism. For example, an economic policy focus on enabling more unicorns, as the European Union is striving to do, threatens to lose sight of other societally desirable forms of entrepreneurship. Similarly, the definition of unicorns is characterized as only superficially precise. Additionally, a focus on unicorns runs the risk of causing increased unethical behavior among entrepreneurs (such as in the Theranos case).


title: Floating-point arithmetic

text: In computing, floating-point arithmetic (FP) is arithmetic that represents real numbers approximately, using an integer with a fixed precision, called the significand, scaled by an integer exponent of a fixed base. For example, 12.345 can be represented as a base-ten floating-point number:


title: Floating-point arithmetic

text: In practice, most floating-point systems use base two, though base ten (decimal floating point) is also common.


title: Floating-point arithmetic

text: The term "floating point" refers to the fact that the number's radix point can "float" anywhere to the left, right, or between the significant digits of the number. This position is indicated by the exponent, so floating point can be considered a form of scientific notation.


title: Floating-point arithmetic

text: A floating-point system can be used to represent, with a fixed number of digits, numbers of very different orders of magnitude — such as the number of meters between galaxies or between protons in an atom. For this reason, floating-point arithmetic is often used to allow very small and very large real numbers that require fast processing times. The result of this dynamic range is that the numbers that can be represented are not uniformly spaced; the difference between two consecutive representable numbers varies with their exponent.


title: Floating-point arithmetic

text: Over the years, a variety of floating-point representations have been used in computers. In 1985, the IEEE 754 Standard for Floating-Point Arithmetic was established, and since the 1990s, the most commonly encountered representations are those defined by the IEEE.


title: Floating-point arithmetic

text: The speed of floating-point operations, commonly measured in terms of FLOPS, is an important characteristic of a computer system, especially for applications that involve intensive mathematical calculations.


title: Floating-point arithmetic

text: A floating-point unit (FPU, colloquially a math coprocessor) is a part of a computer system specially designed to carry out operations on floating-point numbers.


title: Floating-point arithmetic

text: There are several mechanisms by which strings of digits can represent numbers. In common mathematical notation, the digit string can be of any length, and the location of the radix point is indicated by placing an explicit "point" character (dot or comma) there. If the radix point is not specified, then the string implicitly represents an integer and the unstated radix point would be off the right-hand end of the string, next to the least significant digit. In fixed-point systems, a position in the string is specified for the radix point. So a fixed-point scheme might be to use a string of 8 decimal digits with the decimal point in the middle, whereby "00012345" would represent 0001.2345.


title: Floating-point arithmetic

text: In scientific notation, the given number is scaled by a power of 10, so that it lies within a certain range—typically between 1 and 10, with the radix point appearing immediately after the first digit. The scaling factor, as a power of ten, is then indicated separately at the end of the number. For example, the orbital period of Jupiter's moon Io is seconds, a value that would be represented in standard-form scientific notation as seconds.


title: Floating-point arithmetic

text: Floating-point representation is similar in concept to scientific notation. Logically, a floating-point number consists of:


title: Floating-point arithmetic

text: To derive the value of the floating-point number, the "significand" is multiplied by the "base" raised to the power of the "exponent", equivalent to shifting the radix point from its implied position by a number of places equal to the value of the exponent—to the right if the exponent is positive or to the left if the exponent is negative.


title: Floating-point arithmetic

text: Using base-10 (the familiar decimal notation) as an example, the number , which has ten decimal digits of precision, is represented as the significand together with 5 as the exponent. To determine the actual value, a decimal point is placed after the first digit of the significand and the result is multiplied by to give , or . In storing such a number, the base (10) need not be stored, since it will be the same for the entire range of supported numbers, and can thus be inferred.


title: Floating-point arithmetic

text: where is the significand (ignoring any implied decimal point), is the precision (the number of digits in the significand), is the base (in our example, this is the number "ten"), and is the exponent.


title: Floating-point arithmetic

text: Historically, several number bases have been used for representing floating-point numbers, with base two (binary) being the most common, followed by base ten (decimal floating point), and other less common varieties, such as base sixteen (hexadecimal floating point), base eight (octal floating point), base four (quaternary floating point), base three (balanced ternary floating point) and even base 256 and base .


title: Floating-point arithmetic

text: A floating-point number is a rational number, because it can be represented as one integer divided by another; for example is (145/100)×1000 or /100. The base determines the fractions that can be represented; for instance, 1/5 cannot be represented exactly as a floating-point number using a binary base, but 1/5 can be represented exactly using a decimal base (, or ). However, 1/3 cannot be represented exactly by either binary (0.010101...) or decimal (0.333...), but in base 3, it is trivial (0.1 or 1×3) . The occasions on which infinite expansions occur depend on the base and its prime factors.


title: Floating-point arithmetic

text: The way in which the significand (including its sign) and exponent are stored in a computer is implementation-dependent. The common IEEE formats are described in detail later and elsewhere, but as an example, in the binary single-precision (32-bit) floating-point representation, formula_3, and so the significand is a string of 24 bits. For instance, the number π's first 33 bits are:


title: Floating-point arithmetic

text: In this binary expansion, let us denote the positions from 0 (leftmost bit, or most significant bit) to 32 (rightmost bit). The 24-bit significand will stop at position 23, shown as the underlined bit above. The next bit, at position 24, is called the "round bit" or "rounding bit". It is used to round the 33-bit approximation to the nearest 24-bit number (there are specific rules for halfway values, which is not the case here). This bit, which is in this example, is added to the integer formed by the leftmost 24 bits, yielding:


title: Floating-point arithmetic

text: When this is stored in memory using the IEEE 754 encoding, this becomes the significand . The significand is assumed to have a binary point to the right of the leftmost bit. So, the binary representation of π is calculated from left-to-right as follows:


title: Floating-point arithmetic

text: where is the precision ( in this example), is the position of the bit of the significand from the left (starting at and finishing at here) and is the exponent ( in this example).


title: Floating-point arithmetic

text: It can be required that the most significant digit of the significand of a non-zero number be non-zero (except when the corresponding exponent would be smaller than the minimum one). This process is called "normalization". For binary formats (which uses only the digits and ), this non-zero digit is necessarily . Therefore, it does not need to be represented in memory; allowing the format to have one more bit of precision. This rule is variously called the "leading bit convention", the "implicit bit convention", the "hidden bit convention", or the "assumed bit convention".


title: Floating-point arithmetic

text: The floating-point representation is by far the most common way of representing in computers an approximation to real numbers. However, there are alternatives:


title: Floating-point arithmetic

text: In 1914, Leonardo Torres y Quevedo proposed a form of floating point in the course of discussing his design for a special-purpose electromechanical calculator.


title: Floating-point arithmetic

text: In 1938, Konrad Zuse of Berlin completed the Z1, the first binary, programmable mechanical computer; it uses a 24-bit binary floating-point number representation with a 7-bit signed exponent, a 17-bit significand (including one implicit bit), and a sign bit. The more reliable relay-based Z3, completed in 1941, has representations for both positive and negative infinities; in particular, it implements defined operations with infinity, such as formula_10, and it stops on undefined operations, such as formula_11.


title: Floating-point arithmetic

text: Zuse also proposed, but did not complete, carefully rounded floating-point arithmetic that includes formula_12 and NaN representations, anticipating features of the IEEE Standard by four decades. In contrast, von Neumann recommended against floating-point numbers for the 1951 IAS machine, arguing that fixed-point arithmetic is preferable.


title: Floating-point arithmetic

text: The first "commercial" computer with floating-point hardware was Zuse's Z4 computer, designed in 1942–1945. In 1946, Bell Laboratories introduced the Mark V, which implemented decimal floating-point numbers.


title: Floating-point arithmetic

text: The Pilot ACE has binary floating-point arithmetic, and it became operational in 1950 at National Physical Laboratory, UK. Thirty-three were later sold commercially as the English Electric DEUCE. The arithmetic is actually implemented in software, but with a one megahertz clock rate, the speed of floating-point and fixed-point operations in this machine were initially faster than those of many competing computers.


title: Floating-point arithmetic

text: The mass-produced IBM 704 followed in 1954; it introduced the use of a biased exponent. For many decades after that, floating-point hardware was typically an optional feature, and computers that had it were said to be "scientific computers", or to have "scientific computation" (SC) capability (see also Extensions for Scientific Computation (XSC)). It was not until the launch of the Intel i486 in 1989 that "general-purpose" personal computers had floating-point capability in hardware as a standard feature.


title: Floating-point arithmetic

text: The IBM 7094, also introduced in 1962, supported single-precision and double-precision representations, but with no relation to the UNIVAC's representations. Indeed, in 1964, IBM introduced hexadecimal floating-point representations in its System/360 mainframes; these same representations are still available for use in modern z/Architecture systems. In 1998, IBM implemented IEEE-compatible binary floating-point arithmetic in its mainframes; in 2005, IBM also added IEEE-compatible decimal floating-point arithmetic.


title: Floating-point arithmetic

text: Initially, computers used many different representations for floating-point numbers. The lack of standardization at the mainframe level was an ongoing problem by the early 1970s for those writing and maintaining higher-level source code; these manufacturer floating-point standards differed in the word sizes, the representations, and the rounding behavior and general accuracy of operations. Floating-point compatibility across multiple computing systems was in desperate need of standardization by the early 1980s, leading to the creation of the IEEE 754 standard once the 32-bit (or 64-bit) word had become commonplace. This standard was significantly based on a proposal from Intel, which was designing the i8087 numerical coprocessor; Motorola, which was designing the 68000 around the same time, gave significant input as well.


title: Floating-point arithmetic

text: In 1989, mathematician and computer scientist William Kahan was honored with the Turing Award for being the primary architect behind this proposal; he was aided by his student Jerome Coonen and a visiting professor, Harold Stone.


title: Floating-point arithmetic

text: A floating-point number consists of two fixed-point components, whose range depends exclusively on the number of bits or digits in their representation. Whereas components linearly depend on their range, the floating-point range linearly depends on the significand range and exponentially on the range of exponent component, which attaches outstandingly wider range to the number.


title: Floating-point arithmetic

text: On a typical computer system, a "double-precision" (64-bit) binary floating-point number has a coefficient of 53 bits (including 1 implied bit), an exponent of 11 bits, and 1 sign bit. Since 2 = 1024, the complete range of the positive normal floating-point numbers in this format is from 2 ≈ 2 × 10 to approximately 2 ≈ 2 × 10.


title: Floating-point arithmetic

text: which has a 1 as the leading digit and 0 for the remaining digits of the significand, and the smallest possible value for the exponent.


title: Floating-point arithmetic

text: which has "B" − 1 as the value for each digit of the significand and the largest possible value for the exponent.


title: Floating-point arithmetic

text: In addition, there are representable values strictly between −UFL and UFL. Namely, positive and negative zeros, as well as subnormal numbers.


title: Floating-point arithmetic

text: The IEEE standardized the computer representation for binary floating-point numbers in IEEE 754 (a.k.a. IEC 60559) in 1985. This first standard is followed by almost all modern machines. It was revised in 2008. IBM mainframes support IBM's own hexadecimal floating point format and IEEE 754-2008 decimal floating point in addition to the IEEE 754 binary format. The Cray T90 series had an IEEE version, but the SV1 still uses Cray floating-point format.


title: Floating-point arithmetic

text: The standard provides for many closely related formats, differing in only a few details. Five of these formats are called "basic formats", and others are termed "extended precision formats" and "extendable precision format". Three formats are especially widely used in computer hardware and languages:


title: Floating-point arithmetic

text: Increasing the precision of the floating-point representation generally reduces the amount of accumulated round-off error caused by intermediate calculations.


title: Floating-point arithmetic

text: Any integer with absolute value less than 2 can be exactly represented in the single-precision format, and any integer with absolute value less than 2 can be exactly represented in the double-precision format. Furthermore, a wide range of powers of 2 times such a number can be represented. These properties are sometimes used for purely integer data, to get 53-bit integers on platforms that have double-precision floats but only 32-bit integers.


title: Floating-point arithmetic

text: The standard specifies some special values, and their representation: positive infinity (), negative infinity (), a negative zero (−0) distinct from ordinary ("positive") zero, and "not a number" values (NaNs).


title: Floating-point arithmetic

text: Comparison of floating-point numbers, as defined by the IEEE standard, is a bit different from usual integer comparison. Negative and positive zero compare equal, and every NaN compares unequal to every value, including itself. All finite floating-point numbers are strictly smaller than and strictly greater than , and they are ordered in the same way as their values (in the set of real numbers).


title: Floating-point arithmetic

text: Floating-point numbers are typically packed into a computer datum as the sign bit, the exponent field, and the significand or mantissa, from left to right. For the IEEE 754 binary formats (basic and extended) which have extant hardware implementations, they are apportioned as follows:


title: Floating-point arithmetic

text: While the exponent can be positive or negative, in binary formats it is stored as an unsigned number that has a fixed "bias" added to it. Values of all 0s in this field are reserved for the zeros and subnormal numbers; values of all 1s are reserved for the infinities and NaNs. The exponent range for normal numbers is [−126, 127] for single precision, [−1022, 1023] for double, or [−16382, 16383] for quad. Normal numbers exclude subnormal values, zeros, infinities, and NaNs.


title: Floating-point arithmetic

text: In the IEEE binary interchange formats the leading 1 bit of a normalized significand is not actually stored in the computer datum. It is called the "hidden" or "implicit" bit. Because of this, the single-precision format actually has a significand with 24 bits of precision, the double-precision format has 53, and quad has 113.


title: Floating-point arithmetic

text: The sum of the exponent bias (127) and the exponent (1) is 128, so this is represented in the single-precision format as


title: Floating-point arithmetic

text: In the IEEE 754 standard, zero is signed, meaning that there exist both a "positive zero" (+0) and a "negative zero" (−0). In most run-time environments, positive zero is usually printed as "codice_1" and the negative zero as "codice_2". The two values behave as equal in numerical comparisons, but some operations return different results for +0 and −0. For instance, 1/(−0) returns negative infinity, while 1/+0 returns positive infinity (so that the identity is maintained). Other common functions with a discontinuity at "x"=0 which might treat +0 and −0 differently include log("x"), signum("x"), and the principal square root of for any negative number "y". As with any approximation scheme, operations involving "negative zero" can occasionally cause confusion. For example, in IEEE 754, "x" = "y" does not always imply 1/"x" = 1/"y", as 0 = −0 but 1/0 ≠ 1/−0.


title: Floating-point arithmetic

text: Subnormal values fill the underflow gap with values where the absolute distance between them is the same as for adjacent values just outside the underflow gap. This is an improvement over the older practice to just have zero in the underflow gap, and where underflowing results were replaced by zero (flush to zero).


title: Floating-point arithmetic

text: Modern floating-point hardware usually handles subnormal values (as well as normal values), and does not require software emulation for subnormals.


title: Floating-point arithmetic

text: The infinities of the extended real number line can be represented in IEEE floating-point datatypes, just like ordinary floating-point values like 1, 1.5, etc. They are not error values in any way, though they are often (depends on the rounding) used as replacement values when there is an overflow. Upon a divide-by-zero exception, a positive or negative infinity is returned as an exact result. An infinity can also be introduced as a numeral (like C's "INFINITY" macro, or "" if the programming language allows that syntax).


title: Floating-point arithmetic

text: IEEE 754 specifies a special value called "Not a Number" (NaN) to be returned as the result of certain "invalid" operations, such as 0/0, , or sqrt(−1). In general, NaNs will be propagated, i.e. most operations involving a NaN will result in a NaN, although functions that would give some defined result for any given floating-point value will do so for NaNs as well, e.g. NaN ^ 0 = 1. There are two kinds of NaNs: the default "quiet" NaNs and, optionally, "signaling" NaNs. A signaling NaN in any arithmetic operation (including numerical comparisons) will cause an "invalid operation" to be signaled.


title: Floating-point arithmetic

text: The representation of NaNs specified by the standard has some unspecified bits that could be used to encode the type or source of error; but there is no standard for that encoding. In theory, signaling NaNs could be used by a runtime system to flag uninitialized variables, or extend the floating-point numbers with other special values without slowing down the computations with ordinary values, although such extensions are not common.


title: Floating-point arithmetic

text: It is a common misconception that the more esoteric features of the IEEE 754 standard discussed here, such as extended formats, NaN, infinities, subnormals etc., are only of interest to numerical analysts, or for advanced numerical applications. In fact the opposite is true: these features are designed to give safe robust defaults for numerically unsophisticated programmers, in addition to supporting sophisticated numerical libraries by experts. The key designer of IEEE 754, William Kahan notes that it is incorrect to "... [deem] features of IEEE Standard 754 for Binary Floating-Point Arithmetic that ...[are] not appreciated to be features usable by none but numerical experts. The facts are quite the opposite. In 1977 those features were designed into the Intel 8087 to serve the widest possible market... Error-analysis tells us how to design floating-point arithmetic, like IEEE Standard 754, moderately tolerant of well-meaning ignorance among programmers".


title: Floating-point arithmetic

text: A property of the single- and double-precision formats is that their encoding allows one to easily sort them without using floating-point hardware. Their bits interpreted as a two's-complement integer already sort the positives correctly, with the negatives reversed. With an xor to flip the sign bit for positive values and all bits for negative values, all the values become sortable as unsigned integers (with ). It is unclear whether this property is intended.


title: Floating-point arithmetic

text: In addition to the widely used IEEE 754 standard formats, other floating-point formats are used, or have been used, in certain domain-specific areas.


title: Floating-point arithmetic

text: By their nature, all numbers expressed in floating-point format are rational numbers with a terminating expansion in the relevant base (for example, a terminating decimal expansion in base-10, or a terminating binary expansion in base-2). Irrational numbers, such as π or √2, or non-terminating rational numbers, must be approximated. The number of digits (or bits) of precision also limits the set of rational numbers that can be represented exactly. For example, the decimal number 123456789 cannot be exactly represented if only eight decimal digits of precision are available (it would be rounded to one of the two straddling representable values, 12345678 × 10 or 12345679 × 10), the same applies to non-terminating digits (. to be rounded to either .55555555 or .55555556).


title: Floating-point arithmetic

text: When a number is represented in some format (such as a character string) which is not a native floating-point representation supported in a computer implementation, then it will require a conversion before it can be used in that implementation. If the number can be represented exactly in the floating-point format then the conversion is exact. If there is not an exact representation then the conversion requires a choice of which floating-point number to use to represent the original value. The representation chosen will have a different value from the original, and the value thus adjusted is called the "rounded value".


title: Floating-point arithmetic

text: Whether or not a rational number has a terminating expansion depends on the base. For example, in base-10 the number 1/2 has a terminating expansion (0.5) while the number 1/3 does not (0.333...). In base-2 only rationals with denominators that are powers of 2 (such as 1/2 or 3/16) are terminating. Any rational with a denominator that has a prime factor other than 2 will have an infinite binary expansion. This means that numbers that appear to be short and exact when written in decimal format may need to be approximated when converted to binary floating-point. For example, the decimal number 0.1 is not representable in binary floating-point of any finite precision; the exact binary representation would have a "1100" sequence continuing endlessly:


title: Floating-point arithmetic

text: In binary single-precision floating-point, this is represented as "s" = 1.10010010000111111011011 with "e" = 1.


title: Floating-point arithmetic

text: The result of rounding differs from the true value by about 0.03 parts per million, and matches the decimal representation of π in the first 7 digits. The difference is the discretization error and is limited by the machine epsilon.


title: Floating-point arithmetic

text: The arithmetical difference between two consecutive representable floating-point numbers which have the same exponent is called a unit in the last place (ULP). For example, if there is no representable number lying between the representable numbers 1.45a70c22 and 1.45a70c24, the ULP is 2×16, or 2. For numbers with a base-2 exponent part of 0, i.e. numbers with an absolute value higher than or equal to 1 but lower than 2, an ULP is exactly 2 or about 10 in single precision, and exactly 2 or about 10 in double precision. The mandated behavior of IEEE-compliant hardware is that the result be within one-half of a ULP.


title: Floating-point arithmetic

text: Rounding is used when the exact result of a floating-point operation (or a conversion to floating-point format) would need more digits than there are digits in the significand. IEEE 754 requires "correct rounding": that is, the rounded result is as if infinitely precise arithmetic was used to compute the value and then rounded (although in implementation only three extra bits are needed to ensure this). There are several different rounding schemes (or "rounding modes"). Historically, truncation was the typical approach. Since the introduction of IEEE 754, the default method ("round to nearest, ties to even", sometimes called Banker's Rounding) is more commonly used. This method rounds the ideal (infinitely precise) result of an arithmetic operation to the nearest representable value, and gives that representation as the result. In the case of a tie, the value that would make the significand end in an even digit is chosen. The IEEE 754 standard requires the same rounding to be applied to all fundamental algebraic operations, including square root and conversions, when there is a numeric (non-NaN) result. It means that the results of IEEE 754 operations are completely determined in all bits of the result, except for the representation of NaNs. ("Library" functions such as cosine and log are not mandated.)


title: Floating-point arithmetic

text: Alternative modes are useful when the amount of error being introduced must be bounded. Applications that require a bounded error are multi-precision floating-point, and interval arithmetic.


title: Floating-point arithmetic

text: The alternative rounding modes are also useful in diagnosing numerical instability: if the results of a subroutine vary substantially between rounding to + and − infinity then it is likely numerically unstable and affected by round-off error.


title: Floating-point arithmetic

text: Converting a double-precision binary floating-point number to a decimal string is a common operation, but an algorithm producing results that are both accurate and minimal did not appear in print until 1990, with Steele and White's Dragon4. Some of the improvements since then include:


title: Floating-point arithmetic

text: The problem of parsing a decimal string into a binary FP representation is complex, with an accurate parser not appearing until Clinger's 1990 work (implemented in dtoa.c). Further work has likewise progressed in the direction of faster parsing.


title: Floating-point arithmetic

text: For ease of presentation and understanding, decimal radix with 7 digit precision will be used in the examples, as in the IEEE 754 "decimal32" format. The fundamental principles are the same in any radix or precision, except that normalization is optional (it does not affect the numerical value of the result). Here, "s" denotes the significand and "e" denotes the exponent.


title: Floating-point arithmetic

text: A simple method to add floating-point numbers is to first represent them with the same exponent. In the example below, the second number is shifted right by three digits, and one then proceeds with the usual addition method:


title: Floating-point arithmetic

text: This is the true result, the exact sum of the operands. It will be rounded to seven digits and then normalized if necessary. The final result is


title: Floating-point arithmetic

text: The lowest three digits of the second operand (654) are essentially lost. This is round-off error. In extreme cases, the sum of two non-zero numbers may be equal to one of them:


title: Floating-point arithmetic

text: In the above conceptual examples it would appear that a large number of extra digits would need to be provided by the adder to ensure correct rounding; however, for binary addition or subtraction using careful implementation techniques only a "guard" bit, a "rounding" bit and one extra "sticky" bit need to be carried beyond the precision of the operands.


title: Floating-point arithmetic

text: Another problem of loss of significance occurs when "approximations" to two nearly equal numbers are subtracted. In the following example "e" = 5; "s" = 1.234571 and "e" = 5; "s" = 1.234567 are approximations to the rationals 123457.1467 and 123456.659.


title: Floating-point arithmetic

text: The floating-point difference is computed exactly because the numbers are close—the Sterbenz lemma guarantees this, even in case of underflow when gradual underflow is supported. Despite this, the difference of the original numbers is "e" = −1; "s" = 4.877000, which differs more than 20% from the difference "e" = −1; "s" = 4.000000 of the approximations. In extreme cases, all significant digits of precision can be lost. This "cancellation" illustrates the danger in assuming that all of the digits of a computed result are meaningful. Dealing with the consequences of these errors is a topic in numerical analysis; see also Accuracy problems.


title: Floating-point arithmetic

text: To multiply, the significands are multiplied while the exponents are added, and the result is rounded and normalized.


title: Floating-point arithmetic

text: Similarly, division is accomplished by subtracting the divisor's exponent from the dividend's exponent, and dividing the dividend's significand by the divisor's significand.


title: Floating-point arithmetic

text: There are no cancellation or absorption problems with multiplication or division, though small errors may accumulate as operations are performed in succession. In practice, the way these operations are carried out in digital logic can be quite complex (see Booth's multiplication algorithm and Division algorithm).


title: Floating-point arithmetic

text: Literals for floating-point numbers depend on languages. They typically use codice_3 or codice_4 to denote scientific notation. The C programming language and the IEEE 754 standard also define a hexadecimal literal syntax with a base-2 exponent instead of 10. In languages like C, when the decimal exponent is omitted, a decimal point is needed to differentiate them from integers. Other languages do not have an integer type (such as JavaScript), or allow overloading of numeric types (such as Haskell). In these cases, digit strings such as codice_5 may also be floating-point literals.


title: Floating-point arithmetic

text: Prior to the IEEE standard, such conditions usually caused the program to terminate, or triggered some kind of trap that the programmer might be able to catch. How this worked was system-dependent, meaning that floating-point programs were not portable. (The term "exception" as used in IEEE 754 is a general term meaning an exceptional condition, which is not necessarily an error, and is a different usage to that typically defined in programming languages such as a C++ or Java, in which an "exception" is an alternative flow of control, closer to what is termed a "trap" in IEEE 754 terminology.)


title: Floating-point arithmetic

text: Here, the required default method of handling exceptions according to IEEE 754 is discussed (the IEEE 754 optional trapping and other "alternate exception handling" modes are not discussed). Arithmetic exceptions are (by default) required to be recorded in "sticky" status flag bits. That they are "sticky" means that they are not reset by the next (arithmetic) operation, but stay set until explicitly reset. The use of "sticky" flags thus allows for testing of exceptional conditions to be delayed until after a full floating-point expression or subroutine: without them exceptional conditions that could not be otherwise ignored would require explicit testing immediately after every floating-point operation. By default, an operation always returns a result according to specification without interrupting computation. For instance, 1/0 returns +∞, while also setting the divide-by-zero flag bit (this default of ∞ is designed to often return a finite result when used in subsequent operations and so be safely ignored).


title: Floating-point arithmetic

text: The original IEEE 754 standard, however, failed to recommend operations to handle such sets of arithmetic exception flag bits. So while these were implemented in hardware, initially programming language implementations typically did not provide a means to access them (apart from assembler). Over time some programming language standards (e.g., C99/C11 and Fortran) have been updated to specify methods to access and change status flag bits. The 2008 version of the IEEE 754 standard now specifies a few operations for accessing and handling the arithmetic flag bits. The programming model is based on a single thread of execution and use of them by multiple threads has to be handled by a means outside of the standard (e.g. C11 specifies that the flags have thread-local storage).


title: Floating-point arithmetic

text: IEEE 754 specifies five arithmetic exceptions that are to be recorded in the status flags ("sticky bits"):


title: Floating-point arithmetic

text: The default return value for each of the exceptions is designed to give the correct result in the majority of cases such that the exceptions can be ignored in the majority of codes. "inexact" returns a correctly rounded result, and "underflow" returns a value less than or equal to the smallest positive normal number in magnitude and can almost always be ignored. "divide-by-zero" returns infinity exactly, which will typically then divide a finite number and so give zero, or else will give an "invalid" exception subsequently if not, and so can also typically be ignored. For example, the effective resistance of n resistors in parallel (see fig. 1) is given by formula_16. If a short-circuit develops with formula_17 set to 0, formula_18 will return +infinity which will give a final formula_19 of 0, as expected (see the continued fraction example of for another example).


title: Floating-point arithmetic

text: "Overflow" and "invalid" exceptions can typically not be ignored, but do not necessarily represent errors: for example, a root-finding routine, as part of its normal operation, may evaluate a passed-in function at values outside of its domain, returning NaN and an "invalid" exception flag to be ignored until finding a useful start point.


title: Floating-point arithmetic

text: The fact that floating-point numbers cannot precisely represent all real numbers, and that floating-point operations cannot precisely represent true arithmetic operations, leads to many surprising situations. This is related to the finite precision with which computers generally represent numbers.


title: Floating-point arithmetic

text: For example, the non-representability of 0.1 and 0.01 (in binary) means that the result of attempting to square 0.1 is neither 0.01 nor the representable number closest to it. In 24-bit (single precision) representation, 0.1 (decimal) was given previously as ; , which is


title: Floating-point arithmetic

text: Also, the non-representability of π (and π/2) means that an attempted computation of tan(π/2) will not yield a result of infinity, nor will it even overflow in the usual floating-point formats (assuming an accurate implementation of tan). It is simply not possible for standard floating-point hardware to attempt to compute tan(π/2), because π/2 cannot be represented exactly. This computation in C:


title: Floating-point arithmetic

text: will give a result of 16331239353195370.0. In single precision (using the codice_11 function), the result will be −22877332.0.


title: Floating-point arithmetic

text: By the same token, an attempted computation of sin(π) will not yield zero. The result will be (approximately) 0.1225 in double precision, or −0.8742 in single precision.


title: Floating-point arithmetic

text: While floating-point addition and multiplication are both commutative ( and ), they are not necessarily associative. That is, is not necessarily equal to . Using 7-digit significand decimal arithmetic:


title: Floating-point arithmetic

text: In addition to loss of significance, inability to represent numbers such as π and 0.1 exactly, and other slight inaccuracies, the following phenomena may occur:


title: Floating-point arithmetic

text: "Machine precision" is a quantity that characterizes the accuracy of a floating-point system, and is used in backward error analysis of floating-point algorithms. It is also known as unit roundoff or "machine epsilon". Usually denoted , its value depends on the particular rounding being used.


title: Floating-point arithmetic

text: This is important since it bounds the "relative error" in representing any non-zero real number within the normalized range of a floating-point system:


title: Floating-point arithmetic

text: Backward error analysis, the theory of which was developed and popularized by James H. Wilkinson, can be used to establish that an algorithm implementing a numerical function is numerically stable. The basic approach is to show that although the calculated result, due to roundoff errors, will not be exactly correct, it is the exact solution to a nearby problem with slightly perturbed input data. If the perturbation required is small, on the order of the uncertainty in the input data, then the results are in some sense as accurate as the data "deserves". The algorithm is then defined as "backward stable". Stability is a measure of the sensitivity to rounding errors of a given numerical procedure; by contrast, the condition number of a function for a given problem indicates the inherent sensitivity of the function to small perturbations in its input and is independent of the implementation used to solve the problem.


title: Floating-point arithmetic

text: As a trivial example, consider a simple expression giving the inner product of (length two) vectors formula_23 and formula_24, then


title: Floating-point arithmetic

text: by definition, which is the sum of two slightly perturbed (on the order of Ε) input data, and so is backward stable. For more realistic examples in numerical linear algebra, see Higham 2002 and other references below.


title: Floating-point arithmetic

text: Although individual arithmetic operations of IEEE 754 are guaranteed accurate to within half a ULP, more complicated formulae can suffer from larger errors for a variety of reasons. The loss of accuracy can be substantial if a problem or its data are ill-conditioned, meaning that the correct result is hypersensitive to tiny perturbations in its data. However, even functions that are well-conditioned can suffer from large loss of accuracy if an algorithm numerically unstable for that data is used: apparently equivalent formulations of expressions in a programming language can differ markedly in their numerical stability. One approach to remove the risk of such loss of accuracy is the design and analysis of numerically stable algorithms, which is an aim of the branch of mathematics known as numerical analysis. Another approach that can protect against the risk of numerical instabilities is the computation of intermediate (scratch) values in an algorithm at a higher precision than the final result requires, which can remove, or reduce by orders of magnitude, such risk: IEEE 754 quadruple precision and extended precision are designed for this purpose when computing at double precision.


title: Floating-point arithmetic

text: For example, the following algorithm is a direct implementation to compute the function which is well-conditioned at 1.0, however it can be shown to be numerically unstable and lose up to half the significant digits carried by the arithmetic when computed near 1.0.


title: Floating-point arithmetic

text: If, however, intermediate computations are all performed in extended precision (e.g. by setting line [1] to C99 ), then up to full precision in the final double result can be maintained. Alternatively, a numerical analysis of the algorithm reveals that if the following non-obvious change to line [2] is made:


title: Floating-point arithmetic

text: To maintain the properties of such carefully constructed numerically stable programs, careful handling by the compiler is required. Certain "optimizations" that compilers might make (for example, reordering operations) can work against the goals of well-behaved software. There is some controversy about the failings of compilers and language designs in this area: C99 is an example of a language where such optimizations are carefully specified to maintain numerical precision. See the external references at the bottom of this article.


title: Floating-point arithmetic

text: A detailed treatment of the techniques for writing high-quality floating-point software is beyond the scope of this article, and the reader is referred to, and the other references at the bottom of this article. Kahan suggests several rules of thumb that can substantially decrease by orders of magnitude the risk of numerical anomalies, in addition to, or in lieu of, a more careful numerical analysis. These include: as noted above, computing all expressions and intermediate results in the highest precision supported in hardware (a common rule of thumb is to carry twice the precision of the desired result, i.e. compute in double precision for a final single-precision result, or in double extended or quad precision for up to double-precision results); and rounding input data and results to only the precision required and supported by the input data (carrying excess precision in the final result beyond that required and supported by the input data can be misleading, increases storage cost and decreases speed, and the excess bits can affect convergence of numerical procedures: notably, the first form of the iterative example given below converges correctly when using this rule of thumb). Brief descriptions of several additional issues and techniques follow.


title: Floating-point arithmetic

text: As decimal fractions can often not be exactly represented in binary floating-point, such arithmetic is at its best when it is simply being used to measure real-world quantities over a wide range of scales (such as the orbital period of a moon around Saturn or the mass of a proton), and at its worst when it is expected to model the interactions of quantities expressed as decimal strings that are expected to be exact. An example of the latter case is financial calculations. For this reason, financial software tends not to use a binary floating-point number representation. The "decimal" data type of the C# and Python programming languages, and the decimal formats of the IEEE 754-2008 standard, are designed to avoid the problems of binary floating-point representations when applied to human-entered exact decimal values, and make the arithmetic always behave as expected when numbers are printed in decimal.


title: Floating-point arithmetic

text: Expectations from mathematics may not be realized in the field of floating-point computation. For example, it is known that formula_29, and that formula_30, however these facts cannot be relied on when the quantities involved are the result of floating-point computation.


title: Floating-point arithmetic

text: The use of the equality test (codice_12) requires care when dealing with floating-point numbers. Even simple expressions like codice_13 will, on most computers, fail to be true (in IEEE 754 double precision, for example, codice_14 is approximately equal to -4.44089209850063e-16). Consequently, such tests are sometimes replaced with "fuzzy" comparisons (codice_15, where epsilon is sufficiently small and tailored to the application, such as 1.0E−13). The wisdom of doing this varies greatly, and can require numerical analysis to bound epsilon. Values derived from the primary data representation and their comparisons should be performed in a wider, extended, precision to minimize the risk of such inconsistencies due to round-off errors. It is often better to organize the code in such a way that such tests are unnecessary. For example, in computational geometry, exact tests of whether a point lies off or on a line or plane defined by other points can be performed using adaptive precision or exact arithmetic methods.


title: Floating-point arithmetic

text: Small errors in floating-point arithmetic can grow when mathematical algorithms perform operations an enormous number of times. A few examples are matrix inversion, eigenvector computation, and differential equation solving. These algorithms must be very carefully designed, using numerical approaches such as iterative refinement, if they are to work well.


title: Floating-point arithmetic

text: Summation of a vector of floating-point values is a basic algorithm in scientific computing, and so an awareness of when loss of significance can occur is essential. For example, if one is adding a very large number of numbers, the individual addends are very small compared with the sum. This can lead to loss of significance. A typical addition would then be something like


title: Floating-point arithmetic

text: The low 3 digits of the addends are effectively lost. Suppose, for example, that one needs to add many numbers, all approximately equal to 3. After 1000 of them have been added, the running sum is about 3000; the lost digits are not regained. The Kahan summation algorithm may be used to reduce the errors.


title: Floating-point arithmetic

text: Round-off error can affect the convergence and accuracy of iterative numerical procedures. As an example, Archimedes approximated π by calculating the perimeters of polygons inscribing and circumscribing a circle, starting with hexagons, and successively doubling the number of sides. As noted above, computations may be rearranged in a way that is mathematically equivalent but less prone to error (numerical analysis). Two forms of the recurrence formula for the circumscribed polygon are: