AcharyaChanakya/simple-wikipedia huggingface dataset:
The 15th century parish church of St James has important stained glass windows, including one depicting the Passion of Christ, which were restored in 2005. St Kew Highway railway station was a station on the North Cornwall Railway opened on 1 June 1895 and closed on 3 October 1966.
Heinrich Retschury
Heinrich Retschury (* 5 January 1887 in Vienna; † 11 June 1944) was an Austrian football player, referee, coach and official. He played for First Vienna FC and the Austrian team.
Heinrich Retschury played for First Vienna FC as defender. Together with Wilhelm Eipeldauer he formed the defence of the club. He also played in the Austrian national footballteam. His first match was a 4:0 win against Transleithanien (Hungarian part of the Austrian-Hungary Empire). He played another 5 times in the team . His last match was a 1:8 versus England on June,1st 1909. Later he was member of the Olympic squad for the Stockholm Olympic games in 1912, but he did not play.
After his football career he became an international successful referee. At the 1924 Olympic Games in Paris he was referee and led three matches(Semifinal:Uruguay-Netherlands 2:1;First Bronce medal match:Netherlands-Sweden 1:1;Second round match:Sweden-Belgium 8:1) He also led a lot of league- and cupmatches in Austria.
During the First World War he was caretaker of the football national team because the coach Hugo Meisl became soldier. (22 matches,8 won, 3 draws, 11 lost ). Also in the year 1937, after the death of Hugo Meisl, he became cartaker of the national team(5matches 2 won 1 draw 2 lost ) and reached the qualification for the 1938 FIFA World Cup where Austria did not play, because it was occupied by Germany.
Aaron Taylor-Johnson
Aaron Taylor-Johnson (born Aaron Perry Johnson, 13 June, 1990), known before marriage and previously credited as Aaron Johnson is an English-American actor. He is best known for the role as Dave Lizewski in "Kick-Ass" and John Lennon in "Nowhere Boy".
Neuroptera
Neuroptera is a order of net-winged insects, and includes the lacewings, mantidflies, antlions, and their relatives. The order contains some 6,010 species.
The adults of this order possess four membranous wings, with the forewings and hindwings about the same size, and with many veins. They have chewing mouthparts, and undergo complete metamorphosis. Most of the larvae and adults are predators.
The clade first appeared in the Permian period,
Mecoptera
William John Coffee
William John Coffee (1774–1846) was an English artist and sculptor who worked in porcelain, plaster, and terra cotta. He also worked in oil paint, although this was not the thing for which he became famous. His early career was as a modeller for Duesbury at the china factory on Nottingham Road in Derby, England. The later part of his life was spent in America.
In Derby, Coffee made busts of some of the local people and historic figures including a life size sculpture of Erasmus Darwin. This bust is a good example of Coffee's modelling skills and is now on show at Derby Museum. Coffee also produced a terra cotta copy of the Florentine Boar (1806) and a number of terra cotta statues of Greek figures showing medicine and healing for the garden of Joseph Strutt. The garden was given to the town as Derby Arboretum in 1840 complete with statues, but those of the Greek figures are now missing or lost. Coffee also made a terra cotta statue of Asclepius for William Strutt's Derbyshire Infirmary, opened 1810.
Coffee moved from England to New York City in 1816, where he became famous as a sculptor for American historical figures such as James Madison and Thomas Jefferson. He also made the mouldings for Jefferson's house and for the University of Virginia.
Harold Gresley
Harold Gresley (1892 - 1967) was an English artist. His father and grandfather were also artists. He painted mainly landscapes but also some portraits.
Gresley was born in Derbyshire and studied in Derby art school. He was the son of Frank Gresley and grandson of James Stephen Gresley who were both notable artists. He stopped his studies when World War I started. He fought in the Sherwood Foresters and was awarded a medal. After the war he continued his studies in Nottingham under Arthur Spooner, and became a teacher at Repton School. He lived at Chellaston, near Derby until he died in 1967.
Some of his work is shown in Derby Museum and Art Gallery after 77 of his paintings were donated by art collector Alfred E. Goodey.
Ksenia Khairova
Ksenia Leonidovna Khairova (, born Talyzina (); March 29, 1969) is a Soviet and Russian stage and movie actress.
Ksenia Leonidovna Talyzina was born in Moscow on March 29, 1969. Her parents divorced shortly after her birth.
She went school with in-depth study of languages.
In 1990 she graduated GITIS (Eugeny Lazarev's rate).
Her first role was a small part in the movie "Nikolai Vavilov".
She is actress TSATRA.
She now acts mostly in series.
She divorced Khairov. They have a daughter, Anastasia Talyzina (born in 1999).
Cape Verde at the Olympics
Cape Verde has been in every Summer Olympic Games held since 1996. No athletes from Cape Verde have been at any Winter Olympic Games. They have never won a medal.
The National Olympic Committee for Cape Verde is "Comité Olímpico Caboverdeano". It was started in 1989 and recognized in 1993.
Central African Republic at the Olympics
Central African Republic at the Olympics is a history which includes 9 games in 8 countries and 40+ athletes. Since 1964, athletes of the Central African Republic have been part of the "Olympic Movement".
The International Olympic Committee's official abbreviation for the Central African Republic is CAF.
The Central African Republic National Olympic Committee ("Comité National Olympique et Sportif Centrafricain") was formed in 1964. It was recognized by the International Olympic Committee in 1965.
The Central African Republic has been in every Summer Olympic Games held between the1984 Summer Olympics and the 2012 Summer Olympics. A team from the Central African Republic first competed in the 1968 Summer Olympics.
The country has not won an Olympic medal. No athletes from the Central African Republic have been at any Winter Olympic Games.
Chad at the Olympics
Chad at the Olympics is a history which includes 11 games in 10 countries and 20+ athletes. Since 1964, athletes of Chad have been part of the "Olympic Movement".
The International Olympic Committee's official abbreviation for Chad is CHA. In 1964, it was CHD.
The Chad National Olympic Committee was formed in 1963. The "Comité Olympique et Sportif Tchadien". was recognized by the International Olympic Committee (IOC) in 1964.
A team from Chad has been at every Summer Olympic Games held between 1964 and 1972 and from 1984 to 2008.
Chad has not sent a team to any Winter Olympic Games.
Comoros at the Olympics
Comoros was first at the Olympic Games in 1996. They have been in every Summer Olympic Games since 1996. The nation has never been at the Winter Olympic Games.
As of 2010, no athlete from Comoros has won an Olympic medal.
The National Olympic Committee for Comoros was formed in 1979 and recognized by the International Olympic Committee in 1993.
Republic of the Congo at the Olympics
Congo at the Olympics is a history which includes 11 games in 10 countries and 60+ athletes. Since 1964, athletes of the Congo have taken part in the "Olympic Movement".
The International Olympic Committee's official abbreviation for the Congo is CCGO.
The National Olympic Committee for the Congo ("Comité National Olympique et Sportif Congolais") was formed in 1964 and recognized by the International Olympic Committee the same year.
The Republic of the Congo, competing as Congo, was first at the Olympic Games in 1964. Competitors from the Congo missed the 1968 Summer Olympics and boycotted the 1976 Summer Olympics along with most other African nations. Congo has never been in the Winter Olympic Games.
As of 2012, no athlete from Congo has ever won an Olympic medal.
Democratic Republic of the Congo at the Olympics
The Democratic Republic of the Congo was first at the Olympic Games in 1968. The nation was named "Congo Kinshasa" then. The nation's next Olympic appearance was in 1984, when it was named Zaire. The nation has been in every Summer Olympic Games since then. They have never been in the Winter Olympic Games. At the 2000 Games, the nation was named "Democratic Republic of the Congo".
As of 2011, no athlete from DR Congo has ever won an Olympic medal.
The National Olympic Committee for DR Congo was formed in 1963 and recognized by the International Olympic Committee in 1968.
Côte d'Ivoire at the Olympics
Côte d'Ivoire (CIV) has been to all Summer Olympic Games held since 1964 except for 1980. No athletes from Côte d'Ivoire have been in any Winter Olympic Games.
Djibouti at the Olympics
Djibouti has been in 6 Summer Games. They have never been in the Winter Olympic Games.
The National Olympic Committee was formed in 1983. The International Olympic Committee recognized the country in 1984.
Hussein Ahmed Salah won a Bronze medal in the 1988 Summer Olympics for the Men's Marathon.
Egloshayle
Egloshayle is a parish and village in north Cornwall, United Kingdom. The village is beside the River Camel immediately southeast of Wadebridge. The civil parish includes Washaway and Sladesbridge.
Egloshayle was a medieval river port, rivalling Padstow five miles downriver. Egloshayle is now a residential suburb of Wadebridge. The town of Wadebridge developed in the parishes of Egloshayle and St Breock. A Vicar of Egloshayle named Thomas Lovibond was responsible for the building of the first bridge across the River Camel to replace a dangerous ford which was begun in 1468 and completed in 1485.
The parish church, named after St Petroc, is built almost entirely in the Perpendicular style. It has a Norman font, a stone pulpit dating from the 15th century, and a peal of eight bells. The Anglican chapel at Washaway, dating from 1882, has a font which is one of the earliest in the county.
Pencarrow House, seat of the Molesworths (18th century), and Croan House (17th century) are fine examples of smaller country houses.
Kelly Rounds (or Castle Killibury) is an Iron Age fort on the border of the parish and has been associated with the legend of King Arthur.
River Camel
The River Camel is a river in Cornwall, UK. It rises on the edge of Bodmin Moor and together with its tributaries drains a considerable part of North Cornwall. The river issues into the Atlantic Ocean having covered a distance of approximately 30 miles. The river is tidal as far upstream as Egloshayle and is popular for sailing, birdwatching and fishing.
The River Camel rises on the edge of Bodmin Moor, an area which forms part of the granite spine of Cornwall. The river's course is then through upper and middle Devonian rocks, predominantly slates. The only active quarry in the River Camel catchment area is Delabole Quarry. There are some disused mines for a variety of metals in the area. The catchment area of the River Camel covers a total of 413 km² on the western side of Bodmin Moor, and is mainly Devonian slates and granite, with some shales and sandstones.
Huntsham
Great Torrington
Ottery St Mary
Binary adder
Full adders are devices used to add binary numbers. They are used in computers. They take two binary numbers and put them together to get a sum. In its most basic form, it uses two XOR gates, two AND gates, and an OR gate. These gates figure out what the numbers being sent in mean and if the digit needs to be turned on or not.
When solving this example: 1001 + 1100 (9 + 12 in decimal form), it would need five single bits to give an answer. The first digits in each number would go to one adder, 1 and 0. It would calculate that 1 + 0 = 1, so that first digit would be 1. The second digits from each are 0 and 0, and 0 + 0 = 0, so the second digit is 0. the third digit from each are 1 and 0, and 1 + 0 = 1, so the third digit is 1. The fourth digit in each are 1 and 1, and 1 + 1 = 10, but because this is a 2 digit number, it holds the first digit (0) and send the second digit to the next adder. The next adder sees 1, and 1 = 1, so the fifth digit is 1. If we take the sum digits in order, they come out as 10101 (21), so 1001 + 1100 = 10101 (9 + 12 = 21).
Andrew Ference
Andrew James Stewart Ference (born March 17, 1979 in Edmonton, Alberta) is a former Canadian professional ice hockey defenceman. He played for the Edmonton Oilers of the National Hockey League (NHL). He also played for the Pittsburgh Penguins, Calgary Flames, and Boston Bruins.
Ference played hockey in the WHL for 5 seasons with the Portland Winter Hawks. He was drafted by the Pittsburgh Penguins with the 208th overall pick in the 1997 NHL Entry Draft. Ference also played for the Pittsburgh Penguins for 4 seasons, the Calgary Flames for 4 seasons and the Boston Bruins for 7 seasons. During his time with the Bruins, he won the Stanley Cup on June 15, 2011 when they defeated the Vancouver Canucks in game 7 by a score of 4-0.
On July 5, 2013, Horton signed a 4-year deal with the Edmonton Oilers.
Adam McQuaid
Adam McQuaid (born October 12, 1986 in Charlottetown, Prince Edward Island) is an Canadian professional ice hockey defenceman. He currently plays for the Boston Bruins. McQuaid played hockey in the OHL for 4 seasons with the Sudbury Wolves. He was drafted by the Columbus Blue Jackets with the 55th overall pick in the 2005 NHL Entry Draft but never played a game with them and was traded to the Bruins for a fifth-round pick. He won the Stanley Cup with the Bruins on June 15, 2011 when the Bruins defeated the Vancouver Canucks in game 7 by a score of 4-0.
Patrice Bergeron
Patrice Bergeron-Cleary (born July 24, 1985) is a Canadian professional ice hockey centre. He currently plays for the Boston Bruins of the National Hockey League (NHL) and is the captain. Bergeron played hockey in the QMJHL for 2 seasons with the Acadie-Bathurst Titan. He was drafted by the Boston Bruins with the 45th overall pick in the 2003 NHL Entry Draft. He won a gold medal in the 2010 Winter Olympics, 2010 Men's World Ice Hockey Championships and in the 2005 World Junior Ice Hockey Championships. He won the Stanley Cup with the Bruins on June 15, 2011 when the Bruins defeated the Vancouver Canucks in game 7 by a score of 4-0.
Santiago, Nuevo León
Santiago is a municipality in the center of the Mexican state of Nuevo León. It is part of the Monterrey metropolitan area and it has an area of about . , there were 37,886 people living in there.
Administrative divisions of Mexico
The United Mexican States () is a federal republic formed by 32 federal entities () (31 states and 1 federal district).
According to the Constitution of 1917, the states of the federation are free and sovereign. Each state has their own congress and constitution, but the Federal District has only limited autonomy with a local Congress and government. The territory of the Federal District, commonly known as Mexico City, serves as the national capital.
Dennis Seidenberg
Chris Kelly
Chris Kelly (born November 11, 1980 in Toronto, Ontario) is a former Canadian professional ice hockey forward that currently plays for the Boston Bruins of the National Hockey League (NHL). He was drafted by the Ottawa Senators with the 94th overall pick in the 1999 NHL Entry Draft. Kelly played in the OHL for 4 seasons with the London Knights and 1 season with the Sudbury Wolves. He also played hockey formerly with the Ottawa Senators for 7 seasons and for one season with the Anahiem Ducks. He won the Stanley Cup with the Bruins on June 15, 2011 when the Bruins defeated the Vancouver Canucks in game 7 by a score of 4-0.
Megaloptera
Michael Ryder
Michael Wayne Glen Ryder (born March 31, 1980 in Bonavista, Newfoundland and Labrador) is a Canadian professional ice hockey right winger. He currently plays for the New Jersey Devils of the National Hockey League (NHL). He has also played for the Boston Bruins, Dallas Stars, and Montreal Canadiens.
He was drafted by the Montreal Canadiens with the 216th overall pick in the 1998 NHL Entry Draft. Ryder played in the QMJHL for 3 seasons with the Hull Olympiques and 2 seasons in the ECHL with the Tallahassee Tiger Sharks and Mississippi Sea Wolves. He also played hockey formerly with the Montreal Canadiens for 4 seasons. He won the Stanley Cup with the Bruins on June 15, 2011 when the Bruins defeated the Vancouver Canucks in game 7 by a score of 4-0.
Competitive eating
Competitive eating is a term for a sport where people play to see who can eat the most food in a given time. The sport is most commonly played in the United States and Japan. There are many different foods that can be eaten competitively. Common ones include hot dogs, hamburgers, hot wings, and pies.
The most famous competitive eating contest is Nathan's Hot Dog Eating Contest on Coney Island. It and other events are part of a tour known as Major League Eating. There are often competitive eating contests at American fairs and carnivals.
Arithmetic precision
The precision of a numeric value describes the number of digits that are used to show that value. In a scientific setting, this would be the "total" number of digits (sometimes called the "significant figures" or "significant digits") or, less commonly, the number of fractional digits or decimal places (the number of digits following the decimal point). This second definition is useful in financial and engineering applications where the count of digits in the fractional part has particular importance.
In both cases, the term "precision" can be used to describe the position at which an inexact result will be rounded. For example, in floating point arithmetic, a result is rounded to a given or fixed precision, which is the length of the resulting significand. In financial calculations, a number is often rounded to a given number of places (for example, to two places after the decimal separator for many world currencies).
As an example, the decimal quantity 12.345 can be expressed with various numbers of significant digits or decimal places. If insufficient precision is available then the number is rounded in some manner to fit the available precision. The following table shows the results for various total precisions and decimal places rounded to the nearest value using the round-to-even method.
Note that it is often not appropriate to display a figure with more digits than that which can be measured. For instance, if a device measures to the nearest gram and gives a reading of 12.345 kg, it would create "false precision" if the measurement were expressed "12.34500 kg" with 2 extra zeroes ("00") at the end.
The representation of a positive number "x" to a precision of "p" significant digits has a numerical value that is given by the formula
For a negative number, the numerical value is minus that of the absolute value.
The number 0, to any precision, can be taken to be 0.
Future Shop
Future Shop was a Canadian electronic retailer. It was headquartered in Burnaby, British Columbia. The largest Future Shop in Canada was in Edmonton, Alberta. It was purchased on November 4, 2001 for $580 million by Best Buy. It was founded in 1982 by Hassan Khosrowshahi, an Iranian entrepreneur who settled in Vancouver, British Columbia after leaving Iran.
On March 28, 2015, it was announced by Best Buy that they had decided to retire the Future Shop brand and close 66 locations. The former Future Shop locations were re-opened as Best Buy stores.
Shoppers Drug Mart
Shoppers Drug Mart Corporation (TSX: SC ) is Canada's largest pharmacy chain. Shoppers Drug Mart is headquartered in the Toronto, Ontario. The chain is founded by Murray Koffler in 1962. The store is also called Pharmaprix in Quebec and Hawkesbury, Ontario.
The store usually has a organic foods section, at least five food aisles, a healthy living section, a cosmetics centre, a Carlton Cards aisle, an Easypix digital center/photolab, a full selection of over-the-counter drugs and health products and in some stores they have a full service Canada Post office.
Bianca (Percy Jackson)
Bianca di Angelo is a character in the fictional Percy Jackson and the Olympians book series, written by Rick Riordan. Bianca is a half-blood, meaning one parent was a god, and the other was a mortal. Her father is Hades, the god of the Underworld, and her mother is an Italian mortal, named Maria Di Angelo. In "Percy Jackson and the Titan's Curse", she dies because she sacrifices herself after trying to rescue her friends. Her brother, Nico di Angelo, believes it was Percy Jackson's fault that his sister died, and plans to take revenge on Percy in the fourth book of the series, "Percy Jackson and the battle of the Labyrinth".
Document Records
Document Records (founded 1986 by Johnny Parth in Austria) is a now British record label. 2000 Parth sold the label to Gary Atkinson. Originally based in Vienna the label is now in Newton Stewart, Scotland.
The label publishes early American blues, bluegrass, gospel, spirituals jazz, and other rural American genres (this genres are also called "roots" music)and made between 1900 and 1945. The label is also owner of the rights for unrealesed Music made by the Edison Company between 1914 and 1929.
The word "rounding" for a numerical value means replacing it by another value that is approximately equal but has a shorter, simpler, or more explicit form. For example, US$23.74 could be rounded to US$24, the fraction 312/937 could be rounded to 1/3, and the expression formula_1 could be rounded to 1.41.
Rounding is often done on purpose to obtain a value that is easier to write and handle than the original. It may also be done to indicate the accuracy of a computed number; for example, a quantity that was computed as 123,456, but is known to be accurate only to within a few hundred units, is better stated as "about 123,500".
On the other hand, rounding can introduce some "round-off error" as a result. Rounding is almost unavoidable in many computations, especially when dividing two numbers in integer or doing fixed-point arithmetic; when computing mathematical functions such as square roots, logarithms, and sines; or when using a floating point representation with a fixed number of significant digits. In a sequence of calculations, these rounding errors generally accumulate, and in certain "ill-conditioned" cases, they may make the result meaningless.
Accurate rounding of transcendental mathematical functions is difficult, because the number of extra digits that need to be calculated to resolve whether to round up or down cannot be known in advance. This problem is known as "the table-maker's dilemma" ("below").
Rounding has many similarities to the quantization that occurs when physical quantities must be encoded by numbers or digital signals.
Typical rounding problems can include:
The most common type of rounding is to round to an integer; or, more generally, to an integer multiple of some increment—such as rounding to whole tenths of seconds, hundredths of a dollar, to whole multiples of 1/2 or 1/8 inch, to whole dozens or thousands, etc..
In general, rounding a number "x" to a multiple of some specified increment "m" entails the following steps:
For example, rounding "x" = 2.1784 dollars to whole cents (that is, to a multiple of 0.01) entails computing "y" = "x"/"m" = 2.1784/0.01 = 217.84, then rounding "y" to the integer "q" = 218, and finally computing "z" = "q"×"m" = 218×0.01 = 2.18.
When rounding to a predetermined number of significant digits, the increment "m" depends on the magnitude of the number to be rounded (or of the rounded result).
The increment "m" is normally a finite fraction in whatever numeral system that is used to represent the numbers. For display to humans, that usually means the decimal numeral system (that is, "m" is an integer times a power of 10, like 1/1000 or 25/100). For intermediate values stored in digital computers, it often means the binary numeral system ("m" is an integer times a power of 2).
The abstract single-argument "round()" function that returns an integer from an arbitrary real value has at least a dozen distinct concrete definitions presented in the rounding to integer section. The abstract two-argument "round()" function is formally defined here, but in many cases it is used with the implicit value "m" = 1 for the increment and then reduces to the equivalent abstract single-argument function, with also the same dozen distinct concrete definitions.
The most basic form of rounding is to replace an arbitrary number by an integer. All the following rounding modes are concrete implementations of the abstract single-argument "round()" function presented and used in the previous sections.
There are many ways of rounding a number "y" to an integer "q". The most common ones are
The first four methods are called directed rounding, as the displacements from the original number "y" to the rounded value "q" are all directed towards or away from the same limiting value (0, +∞, or −∞).
If "y" is positive, round-down is the same as round-towards-zero, and round-up is the same as round-away-from-zero. If "y" is negative, round-down is the same as round-away-from-zero, and round-up is the same as round-towards-zero. In any case, if "y" is integer, "q" is just "y". The following table illustrates these rounding methods:
Where many calculations are done in sequence, the choice of rounding method can have a very significant effect on the result. A famous instance involved a new index set up by the Vancouver Stock Exchange in 1982. It was initially set at 1000.000, and after 22 months had fallen to about 520 — whereas stock prices had generally increased in the period. The problem was caused by the index being recalculated thousands of times daily, and always being rounded down to 3 decimal places, in such a way that the rounding errors accumulated. Recalculating with better rounding gave an index value of 1098.892 at the end of the same period.
Rounding a number "y" to the nearest integer requires some tie-breaking rule for those cases when "y" is exactly half-way between two integers — that is, when the fraction part of "y" is exactly 0.5.
The following tie-breaking rule, called round half up (or round half towards plus infinity), is widely used in many disciplines. That is, half-way values "y" are always rounded up.
For example, by this rule the value 23.5 gets rounded to 24, but −23.5 gets rounded to −23.
This is one of two rules generally taught in US elementary mathematics classes.
If it were not for the 0.5 fractions, the roundoff errors introduced by the round to nearest method would be quite symmetric: for every fraction that gets rounded up (such as 0.268), there is a complementary fraction (namely, 0.732) that gets rounded down, by the same amount. When rounding a large set of numbers with random fractional parts, these rounding errors would statistically compensate each other, and the expected (average) value of the rounded numbers would be equal to the expected value of the original numbers.
However, the "round half up" tie-breaking rule is not symmetric, as the fractions that are exactly 0.5 always get rounded up. This asymmetry introduces a positive bias in the roundoff errors. For example, if the fraction of "y" consists of three random decimal digits, then the expected value of "q" will be 0.0005 higher than the expected value of "y". For this reason, round-to-nearest with the "round half up" rule is also (ambiguously) known as asymmetric rounding.
One reason for rounding up at 0.5 is that only one digit need be examined. When seeing 17.50000..., for example, the first three figures, 17.5, determines that the figure would be rounded up to 18. If the opposite rule were used (round half down), then all the zero decimal places would need to be examined to determine if the value is exactly 17.5.
One may also use round half down (or round half towards minus infinity) as opposed to the more common "round half up" (the "round half up" method is a common convention, but is nothing more than a convention).
For example, 23.5 gets rounded to 23, and −23.5 gets rounded to −24.
The "round half down" tie-breaking rule is not symmetric, as the fractions that are exactly 0.5 always get rounded down. This asymmetry introduces a negative bias in the roundoff errors. For example, if the fraction of "y" consists of three random decimal digits, then the expected value of "q" will be 0.0005 lower than the expected value of "y". For this reason, round-to-nearest with the "round half down" rule is also (ambiguously) known as asymmetric rounding.
The other tie-breaking method commonly taught and used is the round half away from zero (or round half towards infinity), namely:
For example, 23.5 gets rounded to 24, and −23.5 gets rounded to −24.
This method treats positive and negative values symmetrically, and therefore is free of overall bias if the original numbers are positive or negative with equal probability. However, this rule will still introduce a positive bias for positive numbers, and a negative bias for the negative ones.
It is often used for currency conversions and price roundings (when the amount is first converted into the smallest significant subdivision of the currency, such as cents of a euro) as it is easy to explain by just considering the first fractional digit, independently of supplementary precision digits or sign of the amount (for strict equivalence between the paying and recipient of the amount).
One may also round half towards zero (or round half away from infinity) as opposed to the more common "round half away from zero" (the "round half away from zero" method is a common convention, but is nothing more than a convention).
For example, 23.5 gets rounded to 23, and −23.5 gets rounded to −23.
This method also treats positive and negative values symmetrically, and therefore is free of overall bias if the original numbers are positive or negative with equal probability. However, this rule will still introduce a negative bias for positive numbers, and a positive bias for the negative ones.
A tie-breaking rule that is even less biased is round half to even, namely
Thus, for example, +23.5 becomes +24, +22.5 becomes +22, −22.5 becomes −22, and −23.5 becomes −24.
This method also treats positive and negative values symmetrically, and therefore is free of overall bias if the original numbers are positive or negative with equal probability. In addition, for most reasonable distributions of "y" values, the expected (average) value of the rounded numbers is essentially the same as that of the original numbers, even if the latter are all positive (or all negative). However, this rule will still introduce a positive bias for even numbers (including zero), and a negative bias for the odd ones.
This variant of the round-to-nearest method is also called unbiased rounding (ambiguously, and a bit abusively), convergent rounding, statistician's rounding, Dutch rounding, Gaussian rounding, or bankers' rounding. This is widely used in bookkeeping.
This is the default rounding mode used in IEEE 754 computing functions and operators.
Another tie-breaking rule that is very similar to round half to even, namely
Thus, for example, +22.5 becomes +23, +21.5 becomes +21, −21.5 becomes −21, and −22.5 becomes −23.
This method also treats positive and negative values symmetrically, and therefore is free of overall bias if the original numbers are positive or negative with equal probability. In addition, for most reasonable distributions of "y" values, the expected (average) value of the rounded numbers is essentially the same as that of the original numbers, even if the latter are all positive (or all negative). However, this rule will still introduce a negative bias for even numbers (including zero), and a positive bias for the odd ones.
This variant is almost never used in most computations, except in situations where one wants to avoid rounding 0.5 or −0.5 to zero, or to avoid increasing the scale of numbers represented as floating point (with limited ranges for the scaling exponent), so that a non "infinite" number would round to infinite, or that a small "denormal" value would round to a normal non-zero value (these could occur with the "round half to even" mode). Effectively, this mode prefers preserving the existing scale of tie numbers, avoiding out of range results when possible.
Another unbiased tie-breaking method is stochastic rounding:
Like round-half-to-even, this rule is essentially free of overall bias; but it is also fair among even and odd "q" values. On the other hand, it introduces a random component into the result; performing the same computation twice on the same data may yield two different results. Also, it is open to unconscious bias if humans (rather than computers or devices of chance) are "randomly" deciding in which direction to round.
One method, more obscure than most, is round half alternatingly.
This suppresses the random component of the result, if occurrences of 0.5 fractional parts can be effectively numbered. But it can still introduce a positive or negative bias according to the direction of rounding assigned to the first occurrence, if the total number of occurrences is odd.
In some contexts, all the rounding methods above may be unsatisfactory. For example, suppose that "y" is an accurate measurement of an audio signal, which is being rounded to an integer "q" in order to reduce the storage or transmission costs. If "y" changes slowly with time, any of the rounding method above will result in "q" being completely constant for long intervals, separated by sudden jumps of ±1. When the "q" signal is played back, these steps will be heard as a very disagreeable noise, and any variations of the original signal between two integer values will be completely lost.
One way to avoid this problem is to round each value "y" upwards with probability equal to its fraction, and round it downwards with the complement of that probability. For example, the number 23.17 would be rounded up to 24 with probability 0.17, and down to 23 with probability 1 - 0.17 = 0.83. (This is equivalent to rounding down "y" + "s", where "s" is a random number uniformly distributed between 0 and 1.) With this special rounding, known as dithering, the sudden steps get replaced by a less objectionable noise, and even small variations in the original signal will be preserved to some extent. Like the stochastic approach to tie-breaking, dithering has no bias: if all fraction values are equally likely, rounding up by a certain amount is as likely as rounding down by that same amount; and the same is true for the sum of several rounded numbers. On the other hand, dithering introduces a random component in the result, much greater than that of stochastic tie-breaking.
More precisely, the roundoff error for each dithered number will be a uniformly distributed random variable with mean value of zero, but with a standard deviation formula_12, which is better than the 1/2 standard deviation with the simple predictive methods, but slightly higher than with the simpler stochastic method. However, the sum of "n" rounded numbers will be a random variable with expected error zero, but with standard deviation formula_13 (the total remaining noise) which diverges semi-quadratically and may become easily perceptible, even if the standard deviation of the roundoff error per sample will be formula_14 which slowly converges semi-quadratically to zero. So, this random distribution may still be too high for some applications that are rounding a lot of data.
This variant of the simple dithering method still rounds values with probability equal to its fraction. However, instead of using a random distribution for rounding isolated samples, the roundoff error occurring at each rounded sample is totalled for the next surrounding elements to sample or compute; this accumulated value is then added to the value of these next sampled or computed values to round, so that the modified values will take into account this difference using a predictive model (such as Floyd–Steinberg dithering).
The modified values are then rounded with any one of the above rounding methods, the best ones being with stochastic or dithering methods: in this last case, the sum of "n" rounded numbers will still be a random variable with expected error zero but with an excellent constant standard deviation of formula_15, instead of diverging semi-quadratically when dithering isolated samples; and the overall average roundoff error deviation per rounded sample will be formula_16 that will converge hyperbolically to zero, faster than with the semi-hyperbolic convergence when dithering isolated samples.
In practice, when rounding large sets of sampled data (such as audio, image and video rendering), the accumulation of roundoff errors is most frequently used with a simple predictive rounding of the modified values (such as rounding towards zero), because it will still preserve the hyperbolic convergence towards zero of the overall mean roundoff error bias and of its standard deviation. This enhancement is frequently used in image and audio processing (notably for accurate rescaling and antialiasing operations, where the simple probabilistic dithering of isolated values may still produce perceptible noise, sometimes even worse than the moiré effects occurring with simple non-probabilistic rounding methods applied to isolated samples).
The effective propagation of accumulated roundoff errors may depend on the discrete dimension of the sampled data to round: when sampling bidimensional images, including colored images (that add the discrete dimension of color planes), or tridimensional videos (that add a discrete time dimension), or on polyphonic audio data (using time and channel discrete dimensions), it may still be preferable to propagate this error into a preferred direction, or equally into several orthogonal dimensions, such as vertically vs. horizontally for bidimensional images, or into parallel color channels at the same position and/or timestamp, and depending on other properties of these orthogonal discrete dimensions (according to a perception model). In those cases, several roundoff error accumulators may be used (at least one for each discrete dimension), or a ("n"-1)-dimension vector (or matrix) of accumulators.
In some of these cases, the discrete dimensions of the data to sample and round may be treated non orthogonally: for example, when working with colored images, the trichromatic color planes data in each physical dimension (height, width and optionally time) could be remapped using a perceptive color model, so that the roundoff error accumulators will be designed to preserve lightness with a higher probability than hue or saturation, instead of propagating errors into each orthogonal color plane independently; and in stereophonic audio data the two rounded data channels (left and right) may be rounded together to preserve their mean value in priority to their effective difference that will absorb most of the remaining roundoff errors, in a balanced way around zero.
In some contexts it is desirable to round a given number "x" to a "neat" fraction — that is, the nearest fraction "z" = "m"/"n"
whose numerator "m" and denominator "n" do not exceed a given maximum. This problem is fairly distinct from that of rounding a value to a fixed number of decimal or binary digits, or to a multiple of a given unit "m". This problem is related to Farey sequences, the Stern-Brocot tree, and continued fractions.
This type of rounding, which is also named rounding to a logarithmic scale, is a variant of Rounding to a specified increment but with an increment that is modified depending on the scale and magnitude of the result. Concretely, the intent is to limit the number of significant digits, rounding the value so that non-significant digits will be dropped. This type of rounding occurs implicitly with numbers computed with floating-point values with limited precision (such as IEEE-754 "float" and "double" types), but it may be used more generally to round any real values with any positive number of significant digits and any strictly positive real base.
For example it can be used in engineering graphics for representing data with a logarithmic scale with variable steps (for example wave lengths, whose base is not necessarily an integer measure), or in statistical data to define classes of real values within intervals of exponentially growing widths (but the most common use is with integer bases such as 10 or 2).
This type of rounding is based on a logarithmic scale defined by a fixed non-zero real scaling factor "s" (in most frequent cases this factor is "s"=1) and a fixed positive base "b">1 (not necessarily an integer and most often different from the scaling factor), and a fixed integer number "n">0 of significant digits in that base (which will determine the value of the increment to use for rounding, along with the computed effective scale of the rounded number).
The primary argument number (as well as the resulting rounded number) is first represented in exponential notation "x" = "s"·"a"·"m"·"b", such that the sign "s" is either +1 or −1, the absolute mantissa "a" is restricted to the half-open positive interval [1/"b",1), and the exponent "c" is any (positive or negative) integer. In that representation, all significant digits are in the fractional part of the absolute mantissa whose integer part is always zero.
If the source number (or rounded number) is 0, the absolute mantisssa "a" is defined as 0, the exponent "c" is fixed to an arbitrary value (0 in most conventions, but some floating-point representations cannot use a null absolute mantissa but reserve a specific maximum negative value for the exponent "c" to represent the number 0 itself), and the sign "s" may be arbitrarily chosen between −1 or +1 (it is generally set to +1 for simple zero, or it is set to the same sign as the argument in the rounded value if the number representation allows to differentiate positive and negative zeroes, even if they finally represent the same numeric value 0).
A scaled exponential representation as "x" = "a"·"s"·"b" may also be used equivalently, with a signed mantissa "a" either equal to zero or within one of the two half-open intervals (−1,−1/"b"] and [+1/"b",+1), and this will be the case in the algorithm below.
The steps to compute this scaled rounding are generally similar to the following:
For the abstract "round()" function, this type of rounding can use any one of the "rounding to integer" modes described more completely in the next section, but it is most frequently the "round to nearest" mode (with tie-breaking rules also described more completely below).
Finished lumber, writing paper, capacitors, and many other products are usually sold in only a few standard sizes.
Many design procedures describe how to calculate an approximate value, and then "round" to some standard size using phrases such as "round down to nearest standard value", "round up to nearest standard value", or "round to nearest standard value".
When a set of preferred values is equally spaced on a logarithmic scale,
Choosing the closest preferred value to any given value can be seen as a kind of scaled rounding.
In floating-point arithmetic, rounding aims to turn a given value "x" into a value "z" with a specified number of "significant" digits. In other words, "z" should be a multiple of a number "m" that depends on the magnitude of "z". The number "m" is a power of the base (usually 2 or 10) of the floating-point form.
Apart from this detail, all the variants of rounding discussed above apply to the rounding of floating-point numbers as well. The algorithm for such rounding is presented in the Scaled rounding section above, but with a constant scaling factor "s"=1, and an integer base "b">1.
For results where the rounded result would overflow the result for a directed rounding is either the appropriate signed infinity, or the highest representable positive finite number (or the lowest representable negative finite number if "x" is negative), depending on the direction of rounding. The result of an overflow for the usual case of "round to even" is always the appropriate infinity.
In addition, if the rounded result would underflow, i.e. if the exponent would exceed the lowest representable integer value, the effective result may be either zero (possibly signed if the representation can maintain a distinction of signs for zeroes), or the smallest representable positive finite number (or the highest representable negative finite number if "x" is negative), possibly a "denormal" positive or negative number (if the mantissa is storing all its significant digits, in which case the most significant digit may still be stored in a lower position by setting the highest stored digits to zero, and this stored mantissa does not drop the most significant digit, something that is possible when base "b"=2 because the most significant digit is always 1 in that base), depending on the direction of rounding. The result of an underflow for the usual case of "round to even" is always the appropriate zero.
Rounding a number twice in succession to different precisions, with the latter precision being coarser, is not guaranteed to give the same result as rounding once to the final precision except in the case of directed rounding. For instance rounding 9.46 to one decimal gives 9.5, and then 10 when rounding to integer using rounding half to even, but would give 9 when rounded to integer directly.
Some computer languages and the IEEE 754-2008 standard dictate that in straightforward calculations, the result should not be rounded twice. This has been a particular problem with Java as it is designed to be run identically on different machines, special programming tricks have had to be used to achieve this with x87 floating point.
The Java language was changed to allow different results where the difference does not matter and require a "strictfp" qualifier to be used when the results have to conform accurately.
It is possible to use rounded arithmetic to evaluate the exact value of a function with a discrete domain and range. For example, if we know that an integer "n" is a perfect square, we can compute its square root by converting "n" to a floating-point value "x", computing the approximate square root "y" of "x" with floating point, and then rounding "y" to the nearest integer "q". If "n" is not too big, the floating-point roundoff error in "y" will be less than 0.5, so the rounded value "q" will be the exact square root of "n". In most modern computers, this method may be much faster than computing the square root of "n" by an all-integer algorithm.
William Kahan coined the term "The Table-Maker's Dilemma" for the unknown cost of rounding transcendental functions:
The IEEE floating point standard guarantees that add, subtract, multiply, divide, square root, and floating point remainder will give the correctly rounded result of the infinite precision operation. However, no such guarantee is given for more complex functions and they are typically only accurate to within the last bit at best.
Using the Gelfond–Schneider theorem and Lindemann–Weierstrass theorem, many of the standard elementary functions can be proved to return transcendental results when given rational non-zero arguments; therefore it is always possible to correctly round such functions. However determining a limit for a given precision on how accurate results needs to be computed before a correctly rounded result can be guaranteed may demand a lot of computation time.
There are some packages around now that offer full accuracy. The MPFR package gives correctly rounded arbitrary precision results. IBM has written a package for fast and accurate IEEE elementary functions and in the future the standard libraries may offer such precision.
It is possible to devise well-defined computable numbers which it may never be possible to correctly round no matter how many digits are calculated. For instance, if Goldbach's conjecture is true but unprovable, then it is impossible to correctly round down 0.5 + 10 where n is the first even number greater than 4 which is not the sum of two primes, or 0.5 if there is no such number. This can however be approximated to any given precision even if the conjecture is unprovable.
The concept of rounding is very old, perhaps older even than the concept of division. Some ancient clay tablets found in Mesopotamia contain tables with rounded values of reciprocals and square roots in base 60.
Rounded approximations to π, the length of the year, and the length of the month are also ancient.