Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Special pages
Niidae Wiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Arithmetic
(section)
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Types == Different types of arithmetic systems are discussed in the academic literature. They differ from each other based on what type of number they operate on, what numeral system they use to represent them, and whether they operate on mathematical objects other than numbers.<ref>{{multiref | {{harvnb|Nagel|2002|pp=180–181}} | {{harvnb|Gupta|2019|p=[https://books.google.com/books?id=vcmcDwAAQBAJ&pg=PA3 3]}} | {{harvnb|Vaccaro|Pepiciello|2022|pp=[https://books.google.com/books?id=tZxBEAAAQBAJ&pg=PA9 9–12]}} | {{harvnb|Liebler|2018|p=[https://books.google.com/books?id=Ozb3DwAAQBAJ&pg=PA36 36]}} }}</ref> === Integer arithmetic === [[File:Number line method.svg|thumb|upright=1.3|alt=Diagram of number line method|Using the number line method, calculating <math>5 + 2</math> is performed by starting at the origin of the number line then moving five units to right for the first addend. The result is reached by moving another two units to the right for the second addend.]] Integer arithmetic is the branch of arithmetic that deals with the manipulation of positive and negative whole numbers.<ref>{{multiref | {{harvnb|Romanowski|2008|p=304}} | {{harvnb|Hindry|2011|p=x}} | {{harvnb|Hafstrom|2013|p=[https://books.google.com/books?id=mj_DAgAAQBAJ&pg=PA95 95]}} | {{harvnb|Brent|Zimmermann|2010|p=[https://books.google.com/books?id=-8wuH5AwbwMC&pg=PA1 1]}}}}</ref> Simple one-digit operations can be performed by following or memorizing a table that presents the results of all possible combinations, like an [[addition table]] or a [[multiplication table]]. Other common methods are verbal [[counting]] and [[finger-counting]].<ref>{{multiref | {{harvnb|Kupferman|2015|pp=[https://books.google.com/books?id=Cd87DQAAQBAJ&pg=PA92 45, 92]}} | {{harvnb|Uspenskii|Semenov |2001|p=[https://books.google.com/books?id=yID37VIW-t8C&pg=PA113 113]}} | {{harvnb|Geary|2006|p=[https://books.google.com/books?id=bLZyrZHd1QkC&pg=PA796 796]}} }}</ref> {| class="wikitable" style="display:inline-table; text-align:center; margin:1em .8em 1em 1.6em;" |+ Addition table ! + || 0 || 1 || 2 || 3 || 4 || ... |- ! 0 | 0 || 1 || 2 || 3 || 4 || ... |- ! 1 | 1 || 2 || 3 || 4 || 5 || ... |- ! 2 | 2 || 3 || 4 || 5 || 6 || ... |- ! 3 | 3 || 4 || 5 || 6 || 7 || ... |- ! scope="row" | 4 | 4 || 5 || 6 || 7 || 8 || ... |- ! scope="row" | ... | ... || ... || ... || ... || ... || ... |} {| class="wikitable" style="display:inline-table; text-align:center; margin: 1em .8em 1em 1.6em;" |+ Multiplication table ! × || 0 || 1 || 2 || 3 || 4 || ... |- ! 0 | 0 || 0 || 0 || 0 ||0 || ... |- ! 1 | 0 || 1 || 2 || 3 || 4 || ... |- ! 2 | 0 || 2 || 4 || 6 || 8 || ... |- ! 3 | 0 || 3 || 6 || 9 || 12 || ... |- ! scope="row" | 4 | 0 || 4 || 8 || 12 || 16 || ... |- ! scope="row" | ... | ... || ... || ... || ... || ... || ... |} {{clear}}{{Multiple image | image1 = Addition with carry.png | image2 = Long multiplication.png | caption1 = Example of [[Carry (arithmetic)|addition with carry]]. The black numbers are the addends, the green number is the carry, and the blue number is the sum. | total_width = 400 | caption2 = Example of long multiplication. The black numbers are the multiplier and the multiplicand. The green numbers are intermediary products gained by multiplying the multiplier with only one digit of the multiplicand. The blue number is the total product calculated by adding the intermediary products. | perrow = 2 }} For operations on numbers with more than one digit, different techniques can be employed to calculate the result by using several one-digit operations in a row. For example, in the method [[Carry (arithmetic)|addition with carries]], the two numbers are written one above the other. Starting from the rightmost digit, each pair of digits is added together. The rightmost digit of the sum is written below them. If the sum is a two-digit number then the leftmost digit, called the "carry", is added to the next pair of digits to the left. This process is repeated until all digits have been added.<ref>{{multiref | {{harvnb|Resnick|Ford|2012|p=[https://books.google.com/books?id=xj-j8pw2HN8C&pg=PA110 110]}} | {{harvnb|Klein|Moeller|Dressel|Domahs|2010|pp=67–68}} }}</ref> Other methods used for integer additions are the [[number line]] method, the partial sum method, and the compensation method.<ref>{{multiref | {{harvnb|Quintero|Rosario|2016|p=[https://books.google.com/books?id=YAXyCwAAQBAJ&pg=PA74 74]}} | {{harvnb|Ebby|Hulbert|Broadhead|2020|pp=[https://books.google.com/books?id=shEHEAAAQBAJ&pg=PA24 24–26]}} }}</ref> A similar technique is utilized for subtraction: it also starts with the rightmost digit and uses a "borrow" or a negative carry for the column on the left if the result of the one-digit subtraction is negative.<ref>{{harvnb|Sperling|Stuart|1981|p=7}}</ref> A basic technique of integer multiplication employs repeated addition. For example, the product of <math>3 \times 4</math> can be calculated as <math>3 + 3 + 3 + 3</math>.<ref>{{harvnb|Sperling|Stuart|1981|p=8}}</ref> A common technique for multiplication with larger numbers is called [[long multiplication]]. This method starts by writing the multiplier above the multiplicand. The calculation begins by multiplying the multiplier only with the rightmost digit of the multiplicand and writing the result below, starting in the rightmost column. The same is done for each digit of the multiplicand and the result in each case is shifted one position to the left. As a final step, all the individual products are added to arrive at the total product of the two multi-digit numbers.<ref>{{multiref | {{harvnb|Ma|2020|pp=[https://books.google.com/books?id=2Tr3DwAAQBAJ&pg=PA35 35–36]}} | {{harvnb|Sperling|Stuart|1981|p=9}} }}</ref> Other techniques used for multiplication are the [[grid method]] and the [[lattice method]].<ref>{{harvnb|Mooney|Briggs|Hansen|McCullouch|2014|p=[https://books.google.com/books?id=_dPgAwAAQBAJ&pg=PT148 148]}}</ref> Computer science is interested in [[multiplication algorithms]] with a low [[computational complexity]] to be able to efficiently multiply very large integers, such as the [[Karatsuba algorithm]], the [[Schönhage–Strassen algorithm]], and the [[Toom–Cook multiplication|Toom–Cook algorithm]].<ref>{{multiref | {{harvnb|Klein|2013|p=[https://books.google.com/books?id=GYpEAAAAQBAJ&pg=PA249 249]}} | {{harvnb|Muller|Brunie|Dinechin|Jeannerod|2018|p=[https://books.google.com/books?id=h3ZZDwAAQBAJ&pg=PA539 539]}} }}</ref> A common technique used for division is called [[long division]]. Other methods include [[short division]] and [[Chunking (division)|chunking]].<ref>{{harvnb|Davis|Goulding|Suggate|2017|pp=[https://books.google.com/books?id=7T8lDwAAQBAJ&pg=PA11 11–12]}}</ref> Integer arithmetic is not closed under division. This means that when dividing one integer by another integer, the result is not always an integer. For instance, 7 divided by 2 is not a whole number but 3.5.<ref>{{harvnb|Haylock|Cockburn|2008|p=[https://books.google.com/books?id=hgAr3maZeQUC&pg=PA49 49]}}</ref> One way to ensure that the result is an integer is to [[Rounding|round]] the result to a whole number. However, this method leads to inaccuracies as the original value is altered.<ref>{{multiref | {{harvnb|Prata|2002|p=[https://books.google.com/books?id=MsizNs-zVMAC&pg=PA138 138]}} | {{harvnb|Musser|Peterson|Burger|2013|pp=[https://books.google.com/books?id=8jh7DwAAQBAJ&pg=PA135 135–136]}} }}</ref> Another method is to perform the division only partially and retain the [[remainder]]. For example, 7 divided by 2 is 3 with a remainder of 1. These difficulties are avoided by rational number arithmetic, which allows for the exact representation of fractions.<ref>{{harvnb|Koepf|2021|p=[https://books.google.com/books?id=rOU3EAAAQBAJ&pg=PA49 49]}}</ref> A simple method to calculate [[exponentiation]] is by repeated multiplication. For instance, the exponentiation of <math>3^4</math> can be calculated as <math>3 \times 3 \times 3 \times 3</math>.<ref>{{harvnb|Goodstein|2014|p=[https://books.google.com/books?id=EHjiBQAAQBAJ&pg=PA33 33]}}</ref> A more efficient technique used for large exponents is [[exponentiation by squaring]]. It breaks down the calculation into a number of squaring operations. For example, the exponentiation <math>3^{65}</math> can be written as <math>(((((3^2)^2)^2)^2)^2)^2 \times 3</math>. By taking advantage of repeated squaring operations, only 7 individual operations are needed rather than the 64 operations required for regular repeated multiplication.<ref>{{multiref | {{harvnb|Cafaro|Epicoco|Pulimeno|2018|p=[https://books.google.com/books?id=rs51DwAAQBAJ&pg=PA7 7]}} | {{harvnb|Reilly|2009|p=[https://books.google.com/books?id=q33he4hOlKcC&pg=PA75 75]}} }}</ref> Methods to calculate [[logarithm]]s include the [[Taylor series]] and [[continued fraction]]s.<ref>{{multiref | {{harvnb|Cuyt|Petersen|Verdonk|Waadeland|2008|p=[https://books.google.com/books?id=DQtpJaEs4NIC&pg=PA182 182]}} | {{harvnb|Mahajan|2010|pp=[https://books.google.com/books?id=VrkZN0T0GaUC&pg=PA66 66–69]}} | {{harvnb|Lang|2002|pp=205–206}} }}</ref> Integer arithmetic is not closed under logarithm and under exponentiation with negative exponents, meaning that the result of these operations is not always an integer.<ref>{{multiref | {{harvnb|Kay|2021|p=[https://books.google.com/books?id=aw81EAAAQBAJ&pg=PA57 57]}} | {{harvnb|Cuyt|Petersen|Verdonk|Waadeland|2008|p=[https://books.google.com/books?id=DQtpJaEs4NIC&pg=PA182 182]}} }}</ref> ==== Number theory ==== {{main|Number theory}} Number theory studies the structure and properties of integers as well as the relations and laws between them.<ref>{{multiref | {{harvnb|Bukhshtab|Nechaev|2016}} | {{harvnb|Grigorieva|2018|pp=[https://books.google.com/books?id=mEpjDwAAQBAJ&pg=PR8 viii–ix]}} | {{harvnb|Page|2003|p=[https://www.sciencedirect.com/science/article/abs/pii/B0122274105005032 15]}} }}</ref> Some of the main branches of modern number theory include [[elementary number theory]], [[analytic number theory]], [[algebraic number theory]], and [[geometric number theory]].<ref>{{multiref | {{harvnb|Page|2003|p=[https://www.sciencedirect.com/science/article/abs/pii/B0122274105005032 34]}} | {{harvnb|Yan|2002|p=12}} }}</ref> Elementary number theory studies aspects of integers that can be investigated using elementary methods. Its topics include [[divisibility]], [[factorization]], and [[primality]].<ref>{{multiref | {{harvnb|Page|2003|pp=[https://www.sciencedirect.com/science/article/abs/pii/B0122274105005032 18–19, 34]}} | {{harvnb|Bukhshtab|Nechaev|2014}} }}</ref> Analytic number theory, by contrast, relies on techniques from analysis and calculus. It examines problems like [[prime number theorem|how prime numbers are distributed]] and the claim that [[Goldbach's conjecture|every even number is a sum of two prime numbers]].<ref>{{multiref | {{harvnb|Page|2003|p=[https://www.sciencedirect.com/science/article/abs/pii/B0122274105005032 34]}} | {{harvnb|Karatsuba|2014}} }}</ref> Algebraic number theory employs algebraic structures to analyze the properties of and relations between numbers. Examples are the use of [[Field (mathematics)|fields]] and [[Ring (mathematics)|rings]], as in [[algebraic number field]]s like the [[ring of integers]]. Geometric number theory uses concepts from geometry to study numbers. For instance, it investigates how lattice points with integer coordinates behave in a plane.<ref>{{multiref | {{harvnb|Page|2003|pp=[https://www.sciencedirect.com/science/article/abs/pii/B0122274105005032 34–35]}} | {{harvnb|Vinogradov|2019}} }}</ref> Further branches of number theory are [[probabilistic number theory]], which employs methods from [[probability theory]],<ref>{{harvnb|Kubilyus|2018}}</ref> [[combinatorial number theory]], which relies on the field of [[combinatorics]],<ref>{{harvnb|Pomerance|Sárközy|1995|p=[https://books.google.com/books?id=5ktBP5vUl5gC&pg=PA969 969]}}</ref> [[computational number theory]], which approaches number-theoretic problems with computational methods,<ref>{{harvnb|Pomerance|2010}}</ref> and applied number theory, which examines the application of number theory to fields like [[physics]], [[biology]], and [[cryptography]].<ref>{{multiref | {{harvnb|Yan|2002|pp=12, 303–305}} | {{harvnb|Yan|2013a|p=[https://books.google.com/books?id=74oBi4ys0UUC&pg=PA15 15]}} }}</ref> Influential theorems in number theory include the [[fundamental theorem of arithmetic]], [[Euclid's theorem]], and [[Fermat's Last Theorem]].<ref>{{multiref | {{harvnb|Bukhshtab|Nechaev|2016}} | {{harvnb|Křížek|Somer|Šolcová|2021|pp=[https://books.google.com/books?id=tklEEAAAQBAJ&pg=PA23 23, 25, 37]}} }}</ref> According to the fundamental theorem of arithmetic, every integer greater than 1 is either a prime number or can be represented as a unique product of prime numbers. For example, the [[number 18]] is not a prime number and can be represented as <math>2 \times 3 \times 3</math>, all of which are prime numbers. The [[number 19]], by contrast, is a prime number that has no other prime factorization.<ref>{{multiref | {{harvnb|Křížek|Somer|Šolcová|2021|p=[https://books.google.com/books?id=tklEEAAAQBAJ&pg=PA23 23]}} | {{harvnb|Riesel|2012|p=[https://books.google.com/books?id=ITvaBwAAQBAJ&pg=PA2 2]}} }}</ref> Euclid's theorem states that there are infinitely many prime numbers.<ref>{{multiref | {{harvnb|Bukhshtab|Nechaev|2016}} | {{harvnb|Křížek|Somer|Šolcová|2021|p=[https://books.google.com/books?id=tklEEAAAQBAJ&pg=PA25 25]}} }}</ref> Fermat's Last Theorem is the statement that no positive integer values exist for <math>a</math>, <math>b</math>, and <math>c</math> that solve the equation <math>a^n + b^n = c^n</math> if <math>n</math> is greater than <math>2</math>.<ref>{{multiref | {{harvnb|Bukhshtab|Nechaev|2016}} | {{harvnb|Křížek|Somer|Šolcová|2021|p=[https://books.google.com/books?id=tklEEAAAQBAJ&pg=PA37 37]}} }}</ref> === Rational number arithmetic === Rational number arithmetic is the branch of arithmetic that deals with the manipulation of numbers that can be expressed as a [[ratio]] of two integers.<ref>{{multiref | {{harvnb|Gellert|Hellwich|Kästner|Küstner|2012|p=[https://books.google.com/books?id=1jH7CAAAQBAJ&pg=PA30 30]}} | {{harvnb|Romanowski|2008|p=304}} | {{harvnb|Hindry|2011|p=x}} | {{harvnb|Hafstrom|2013|p=[https://books.google.com/books?id=mj_DAgAAQBAJ&pg=PA123 123]}} | {{harvnb|Cohen|2003|p=[https://books.google.com/books?id=URK2DwAAQBAJ&pg=PA37 37]}}}}</ref> Most arithmetic operations on rational numbers can be calculated by performing a series of integer arithmetic operations on the numerators and the denominators of the involved numbers. If two rational numbers have the same denominator then they can be added by adding their numerators and keeping the common denominator. For example, <math>\tfrac{2}{7} + \tfrac{3}{7} = \tfrac{5}{7}</math>. A similar procedure is used for subtraction. If the two numbers do not have the same denominator then they must be transformed to find a common denominator. This can be achieved by scaling the first number with the denominator of the second number while scaling the second number with the denominator of the first number. For instance, <math>\tfrac{1}{3} + \tfrac{1}{2} = \tfrac{1 \cdot 2}{3 \cdot 2} + \tfrac{1 \cdot 3}{2 \cdot 3} = \tfrac{2}{6} + \tfrac{3}{6} = \tfrac{5}{6}</math>.<ref>{{multiref | {{harvnb|Gellert|Hellwich|Kästner|Küstner|2012|pp=[https://books.google.com/books?id=1jH7CAAAQBAJ&pg=PA31 31–32]}} | {{harvnb|Musser|Peterson|Burger|2013|p=[https://books.google.com/books?id=8jh7DwAAQBAJ&pg=PA347 347]}} }}</ref> Two rational numbers are multiplied by multiplying their numerators and their denominators respectively, as in <math>\tfrac{2}{3} \cdot \tfrac{2}{5} = \tfrac{2 \cdot 2}{3 \cdot 5} = \tfrac{4}{15}</math>. Dividing one rational number by another can be achieved by multiplying the first number with the [[Multiplicative inverse|reciprocal]] of the second number. This means that the numerator and the denominator of the second number change position. For example, <math>\tfrac{3}{5} : \tfrac{2}{7} = \tfrac{3}{5} \cdot \tfrac{7}{2} = \tfrac{21}{10}</math>.<ref>{{harvnb|Gellert|Hellwich|Kästner|Küstner|2012|pp=[https://books.google.com/books?id=1jH7CAAAQBAJ&pg=PA32 32–33]}}</ref> Unlike integer arithmetic, rational number arithmetic is closed under division as long as the divisor is not 0.<ref>{{harvnb|Gellert|Hellwich|Kästner|Küstner|2012|p=[https://books.google.com/books?id=1jH7CAAAQBAJ&pg=PA33 33]}}</ref> Both integer arithmetic and rational number arithmetic are not closed under exponentiation and logarithm.<ref>{{harvnb|Klose|2014|p=[https://books.google.com/books?id=rG7iBQAAQBAJ&pg=PA107 107]}}</ref> One way to calculate exponentiation with a fractional exponent is to perform two separate calculations: one exponentiation using the numerator of the exponent followed by drawing the [[nth root]] of the result based on the denominator of the exponent. For example, <math>5^\frac{2}{3} = \sqrt[3]{5^2}</math>. The first operation can be completed using methods like repeated multiplication or exponentiation by squaring. One way to get an approximate result for the second operation is to employ [[Newton's method]], which uses a series of steps to gradually refine an initial guess until it reaches the desired level of accuracy.<ref>{{multiref | {{harvnb|Hoffman|Frankel|2018|pp=[https://books.google.com/books?id=F5K3DwAAQBAJ&pg=PA161 161–162]}} | {{harvnb|Lange|2010|pp=[https://books.google.com/books?id=AtiDhx2bsiMC&pg=PA248 248–249]}} | {{harvnb|Klose|2014|pp=[https://books.google.com/books?id=rG7iBQAAQBAJ&pg=PA105 105–107]}} }}</ref> The Taylor series or the continued fraction method can be utilized to calculate logarithms.<ref>{{multiref | {{harvnb|Cuyt|Petersen|Verdonk|Waadeland|2008|p=[https://books.google.com/books?id=DQtpJaEs4NIC&pg=PA182 182]}} | {{harvnb|Mahajan|2010|pp=[https://books.google.com/books?id=VrkZN0T0GaUC&pg=PA66 66–69]}} }}</ref> The [[decimal fraction]] notation is a special way of representing rational numbers whose denominator is a power of 10. For instance, the rational numbers <math>\tfrac{1}{10}</math>, <math>\tfrac{371}{100}</math>, and <math>\tfrac{44}{10000}</math> are written as 0.1, 3.71, and 0.0044 in the decimal fraction notation.<ref>{{multiref | {{harvnb|Gellert|Hellwich|Kästner|Küstner|2012|p=[https://books.google.com/books?id=1jH7CAAAQBAJ&pg=PA33 33]}} | {{harvnb|Igarashi|Altman|Funada|Kamiyama|2014|p=[https://books.google.com/books?id=58ySAwAAQBAJ&pg=PA18 18]}} }}</ref> Modified versions of integer calculation methods like addition with carry and long multiplication can be applied to calculations with decimal fractions.<ref>{{multiref | {{harvnb|Gellert|Hellwich|Kästner|Küstner|2012|p=[https://books.google.com/books?id=1jH7CAAAQBAJ&pg=PA35 35]}} | {{harvnb|Booker|Bond|Sparrow|Swan|2015|pp=[https://books.google.com/books?id=lTLiBAAAQBAJ&pg=PA308 308–309]}} }}</ref> Not all rational numbers have a finite representation in the decimal notation. For example, the rational number <math>\tfrac{1}{3}</math> corresponds to 0.333... with an infinite number of 3s. The shortened notation for this type of [[repeating decimal]] is 0.{{overline|3}}.<ref>{{multiref | {{harvnb|Gellert|Hellwich|Kästner|Küstner|2012|p=[https://books.google.com/books?id=1jH7CAAAQBAJ&pg=PA34 34]}} | {{harvnb|Igarashi|Altman|Funada|Kamiyama|2014|p=[https://books.google.com/books?id=58ySAwAAQBAJ&pg=PA18 18]}} }}</ref> Every repeating decimal expresses a rational number.<ref>{{harvnb|Musser|Peterson|Burger|2013|p=[https://books.google.com/books?id=8jh7DwAAQBAJ&pg=PA358 358]}}</ref> === Real number arithmetic === Real number arithmetic is the branch of arithmetic that deals with the manipulation of both rational and irrational numbers. Irrational numbers are numbers that cannot be expressed through fractions or repeated decimals, like the root of 2 and [[Pi|{{pi}}]].<ref>{{multiref | {{harvnb|Musser|Peterson|Burger|2013|pp=[https://books.google.com/books?id=8jh7DwAAQBAJ&pg=PA358 358–359]}} | {{harvnb|Kudryavtsev|2020}} | {{harvnb|Rooney|2021|p=[https://books.google.com/books?id=WnVeEAAAQBAJ&pg=PA34 34]}} | {{harvnb|Young|2010|pp=[https://books.google.com/books?id=9HRLAn326zEC&pg=RA1-PA994 994–996]}} | {{harvnb|Farmer|2023|p=[https://books.google.com/books?id=VfOkEAAAQBAJ&pg=PA139 139]}} }}</ref> Unlike rational number arithmetic, real number arithmetic is closed under exponentiation as long as it uses a positive number as its base. The same is true for the logarithm of positive real numbers as long as the logarithm base is positive and not 1.<ref>{{multiref | {{harvnb|Rossi|2011|p=[https://books.google.com/books?id=kSwVGbBtel8C&pg=PA101 101]}} | {{harvnb|Reitano|2010|p=[https://books.google.com/books?id=JYX6AQAAQBAJ&pg=PA42 42]}} | {{harvnb|Bronshtein|Semendyayev|Musiol|Mühlig|2015|p=[https://books.google.com/books?id=5L6BBwAAQBAJ&pg=PA2 2]}} }}</ref> Irrational numbers involve an infinite non-repeating series of decimal digits. Because of this, there is often no simple and accurate way to express the results of arithmetic operations like <math>\sqrt{2} + \pi</math> or {{nobr|<math>e \cdot \sqrt{3}</math>.}}<ref>{{multiref | {{harvnb|Musser|Peterson|Burger|2013|pp=[https://books.google.com/books?id=8jh7DwAAQBAJ&pg=PA358 358–359]}} | {{harvnb|Kudryavtsev|2020}} | {{harvnb|Rooney|2021|p=[https://books.google.com/books?id=WnVeEAAAQBAJ&pg=PA34 34]}} | {{harvnb|Young|2010|pp=[https://books.google.com/books?id=9HRLAn326zEC&pg=RA1-PA994 994–996]}} }}</ref> In cases where absolute precision is not required, the problem of calculating arithmetic operations on real numbers is usually addressed by [[truncation]] or [[rounding]]. For truncation, a certain number of leftmost digits are kept and remaining digits are discarded or replaced by zeros. For example, the number {{pi}} has an infinite number of digits starting with 3.14159.... If this number is truncated to 4 decimal places, the result is 3.141. Rounding is a similar process in which the last preserved digit is increased by one if the next digit is 5 or greater but remains the same if the next digit is less than 5, so that the rounded number is the best approximation of a given precision for the original number. For instance, if the number {{pi}} is rounded to 4 decimal places, the result is 3.142 because the following digit is a 5, so 3.142 is closer to {{pi}} than 3.141.<ref>{{multiref | {{harvnb|Wallis|2013|pp=[https://books.google.com/books?id=ONgRBwAAQBAJ&pg=PA20 20–21]}} | {{harvnb|Young|2010|pp=[https://books.google.com/books?id=9HRLAn326zEC&pg=RA1-PA996 996–997]}} | {{harvnb|Young|2021|pp=[https://books.google.com/books?id=hpVFEAAAQBAJ&pg=RA1-PA4 4–5]}} }}</ref> These methods allow computers to efficiently perform approximate calculations on real numbers.<ref>{{harvnb|Koren|2018|p=[https://books.google.com/books?id=wUBZDwAAQBAJ&pg=PA71 71]}}</ref> === Approximations and errors === In science and engineering, numbers represent estimates of physical quantities derived from [[measurement]] or modeling. Unlike mathematically exact numbers such as {{pi}} or {{nobr|{{tmath|\sqrt2}},}} scientifically relevant numerical data are inherently inexact, involving some [[measurement uncertainty]].<ref>{{harvnb|Drosg|2007|pp=1–5}}</ref> One basic way to express the degree of certainty about each number's value and avoid [[false precision]] is to round each measurement to a certain number of digits, called [[significant digit]]s, which are implied to be accurate. For example, a person's height measured with a [[tape measure]] might only be precisely known to the nearest centimeter, so should be presented as 1.62 meters rather than 1.6217 meters. If converted to imperial units, this quantity should be rounded to 64 inches or 63.8 inches rather than 63.7795 inches, to clearly convey the precision of the measurement. When a number is written using ordinary decimal notation, leading zeros are not significant, and trailing zeros of numbers not written with a decimal point are implicitly considered to be non-significant.<ref>{{harvnb|Bohacek|2009|pp=18–19}}</ref> For example, the numbers 0.056 and 1200 each have only 2 significant digits, but the number 40.00 has 4 significant digits. Representing uncertainty using only significant digits is a relatively crude method, with some unintuitive subtleties; explicitly keeping track of an estimate or upper bound of the [[approximation error]] is a more sophisticated approach.<ref>{{multiref | {{harvnb|Higham|2002|pp=3–5}} | {{harvnb|Bohacek|2009|pp=8–19}} }}</ref> In the example, the person's height might be represented as {{nobr|1.62 ± 0.005}} meters or {{nobr|63.8 ± 0.2 inches}}.<ref>{{harvnb|Bohacek|2009|pp=18–19}}</ref> In performing calculations with uncertain quantities, the [[propagation of uncertainty|uncertainty should be propagated]] to calculated quantities. When adding or subtracting two or more quantities, add the [[absolute uncertainty|absolute uncertainties]] of each summand together to obtain the absolute uncertainty of the sum. When multiplying or dividing two or more quantities, add the [[relative uncertainty|relative uncertainties]] of each factor together to obtain the relative uncertainty of the product.<ref>{{harvnb|Bohacek|2009|pp=23–30}}</ref> When representing uncertainty by significant digits, uncertainty can be coarsely propagated by rounding the result of adding or subtracting two or more quantities to the leftmost last significant decimal place among the summands, and by rounding the result of multiplying or dividing two or more quantities to the least number of significant digits among the factors.<ref>{{harvnb|Griffin|1935}}</ref> (See {{slink|Significant figures#Arithmetic}}.) More sophisticated methods of dealing with uncertain values include [[interval arithmetic]] and [[affine arithmetic]]. Interval arithmetic describes operations on [[Interval (mathematics)|intervals]]. Intervals can be used to represent a range of values if one does not know the precise magnitude, for example, because of [[measurement error]]s. Interval arithmetic includes operations like addition and multiplication on intervals, as in <math>[1, 2] + [3, 4] = [4, 6]</math> and <math>[1, 2] \times [3, 4] = [3, 8]</math>.<ref>{{multiref | {{harvnb|Moore|Kearfott|Cloud|2009|pp=[https://books.google.com/books?id=kd8FmmN7sAoC&pg=PA10 10–11, 19]}} | {{harvnb|Pharr|Jakob|Humphreys|2023|p=[https://books.google.com/books?id=kUtwEAAAQBAJ&pg=PA1057 1057]}} }}</ref> It is closely related to affine arithmetic, which aims to give more precise results by performing calculations on affine forms rather than intervals. An affine form is a number together with error terms that describe how the number may deviate from the actual magnitude.<ref>{{multiref | {{harvnb|Vaccaro|Pepiciello|2022|pp=[https://books.google.com/books?id=tZxBEAAAQBAJ&pg=PA9 9–11]}} | {{harvnb|Chakraverty|Rout|2022|pp=2–4, 39–40}} }}</ref> The precision of numerical quantities can be expressed uniformly using [[Normalized number|normalized scientific notation]], which is also convenient for concisely representing numbers which are much larger or smaller than 1. Using scientific notation, a number is decomposed into the product of a number between 1 and 10, called the ''[[significand]]'', and 10 raised to some integer power, called the ''exponent''. The significand consists of the significant digits of the number, and is written as a leading digit 1–9 followed by a decimal point and a sequence of digits 0–9. For example, the normalized scientific notation of the number 8276000 is <math>8.276 \times 10^6</math> with significand 8.276 and exponent 6, and the normalized scientific notation of the number 0.00735 is <math>7.35 \times 10^{-3}</math> with significand 7.35 and exponent −3.<ref>{{multiref | {{harvnb|Wallis|2013|p=[https://books.google.com/books?id=ONgRBwAAQBAJ&pg=PA20 20]}} | {{harvnb|Roe|deForest|Jamshidi|2018|p=[https://books.google.com/books?id=3ppYDwAAQBAJ&pg=PA24 24]}} }}</ref> Unlike ordinary decimal notation, where trailing zeros of large numbers are implicitly considered to be non-significant, in scientific notation every digit in the significand is considered significant, and adding trailing zeros indicates higher precision. For example, while the number 1200 implicitly has only 2 significant digits, the number {{tmath|1.20 \times 10^3}} explicitly has 3.<ref>{{harvnb|Lustick|1997}}</ref> A common method employed by computers to approximate real number arithmetic is called [[floating-point arithmetic]]. It represents real numbers similar to the scientific notation through three numbers: a significand, a base, and an exponent.<ref>{{harvnb|Muller|Brisebarre|Dinechin|Jeannerod|2009|pp=[https://books.google.com/books?id=baFvrIOPvncC&pg=PA13 13–16]}}</ref> The precision of the significand is limited by the number of bits allocated to represent it. If an arithmetic operation results in a number that requires more bits than are available, the computer rounds the result to the closest representable number. This leads to [[rounding error]]s.<ref>{{multiref | {{harvnb|Koren|2018|p=[https://books.google.com/books?id=wUBZDwAAQBAJ&pg=PA71 71]}} | {{harvnb|Muller|Brisebarre|Dinechin|Jeannerod|2009|pp=[https://books.google.com/books?id=baFvrIOPvncC&pg=PA13 13–16]}} | {{harvnb|Swartzlander|2017|p=[https://books.google.com/books?id=VOnyWUUUj04C&pg=SA11-PA19 11.19]}} }}</ref> A consequence of this behavior is that certain laws of arithmetic are violated by floating-point arithmetic. For example, floating-point addition is not associative since the rounding errors introduced can depend on the order of the additions. This means that the result of <math>(a + b) + c</math> is sometimes different from the result of {{nobr|<math>a + (b + c)</math>.}}<ref>{{multiref | {{harvnb|Stewart|2022|p=[https://books.google.com/books?id=twafEAAAQBAJ&pg=PA26 26]}} | {{harvnb|Meyer|2023|p=[https://books.google.com/books?id=-X-_EAAAQBAJ&pg=PA234 234]}} }}</ref> The most common technical standard used for floating-point arithmetic is called [[IEEE 754]]. Among other things, it determines how numbers are represented, how arithmetic operations and rounding are performed, and how errors and exceptions are handled.<ref>{{multiref | {{harvnb|Muller|Brisebarre|Dinechin|Jeannerod|2009|p=[https://books.google.com/books?id=baFvrIOPvncC&pg=PA54 54]}} | {{harvnb|Brent|Zimmermann|2010|p=[https://books.google.com/books?id=-8wuH5AwbwMC&pg=PA79 79]}} | {{harvnb|Cryer|2014|p=[https://books.google.com/books?id=_x3pAwAAQBAJ&pg=PA450 450]}} }}</ref> In cases where computation speed is not a limiting factor, it is possible to use [[arbitrary-precision arithmetic]], for which the precision of calculations is only restricted by the computer's memory.<ref>{{harvnb|Duffy|2018|p=[https://books.google.com/books?id=BTttDwAAQBAJ&pg=PT1225 1225]}}</ref> === Tool use === [[File:Mental calculation at primary school.jpg|thumb|right|alt=Painting of students engaged in mental arithmetic|Calculations in [[mental arithmetic]] are done exclusively in the mind without relying on external aids.]] Forms of arithmetic can also be distinguished by the [[mathematical instrument|tools]] employed to perform calculations and include many approaches besides the regular use of pen and paper. [[Mental arithmetic]] relies exclusively on the [[mind]] without external tools. Instead, it utilizes visualization, memorization, and certain calculation techniques to solve arithmetic problems.<ref>{{multiref | {{harvnb|Musser|Peterson|Burger|2013|p=[https://books.google.com/books?id=8jh7DwAAQBAJ&pg=PA131 131]}} | {{harvnb|Verschaffel|Torbeyns|De Smedt|2011|p=[https://books.google.com/books?id=xZuSxo4JxoAC&pg=PA2177 2177]}} }}</ref> One such technique is the compensation method, which consists in altering the numbers to make the calculation easier and then adjusting the result afterward. For example, instead of calculating <math>85-47</math>, one calculates <math>85-50</math> which is easier because it uses a round number. In the next step, one adds <math>3</math> to the result to compensate for the earlier adjustment.<ref>{{multiref | {{harvnb|Emerson|Babtie|2014|p=[https://books.google.com/books?id=NQ-aBQAAQBAJ&pg=PA147 147]}} | {{harvnb|Musser|Peterson|Burger|2013|pp=[https://books.google.com/books?id=8jh7DwAAQBAJ&pg=PA131 131–132]}} | {{harvnb|Verschaffel|Torbeyns|De Smedt|2011|p=[https://books.google.com/books?id=xZuSxo4JxoAC&pg=PA2177 2177]}} }}</ref> Mental arithmetic is often taught in primary education to train the numerical abilities of the students.<ref>{{multiref | {{harvnb|Musser|Peterson|Burger|2013|p=[https://books.google.com/books?id=8jh7DwAAQBAJ&pg=PA131 131]}} | {{harvnb|Verschaffel|Torbeyns|De Smedt|2011|p=[https://books.google.com/books?id=xZuSxo4JxoAC&pg=PA2177 2177]}} }}</ref> The human body can also be employed as an arithmetic tool. The use of hands in [[finger counting]] is often introduced to young children to teach them numbers and simple calculations. In its most basic form, the number of extended fingers corresponds to the represented quantity and arithmetic operations like addition and subtraction are performed by extending or retracting fingers. This system is limited to small numbers compared to more advanced systems which employ different approaches to represent larger quantities.<ref>{{multiref | {{harvnb|Dowker|2019|p=[https://books.google.com/books?id=GQaQDwAAQBAJ&pg=PA114 114]}} | {{harvnb|Berch|Geary|Koepke|2015|p=[https://books.google.com/books?id=XS9OBQAAQBAJ&pg=PA124 124]}} | {{harvnb|Otis|2024|pp=[https://books.google.com/books?id=07jiEAAAQBAJ&pg=PA15 15–19]}} | {{harvnb|Geary|2006|p=[https://books.google.com/books?id=bLZyrZHd1QkC&pg=PA796 796]}} }}</ref> The human voice is used as an arithmetic aid in verbal counting.<ref>{{multiref | {{harvnb|Otis|2024|pp=[https://books.google.com/books?id=07jiEAAAQBAJ&pg=PA15 15–19]}} | {{harvnb|Geary|2006|p=[https://books.google.com/books?id=bLZyrZHd1QkC&pg=PA796 796]}} }}</ref> [[File:Chinese-abacus.jpg|thumb|left|alt=Photo of a Chinese abacus|Abacuses are tools to perform arithmetic operations by moving beads.]] [[Tally marks]] are a simple system based on external tools other than the body. This system relies on mark making, such as strokes drawn on a surface or [[Notch (engineering)|notches]] carved into a wooden stick, to keep track of quantities. Some forms of tally marks arrange the strokes in groups of five to make them easier to read.<ref>{{multiref | {{harvnb|Ore|1948|p=8}} | {{harvnb|Mazumder|Ebong|2023|p=[https://books.google.com/books?id=7oS_EAAAQBAJ&pg=PA18 18]}} }}</ref> The [[abacus]] is a more advanced tool to represent numbers and perform calculations. An abacus usually consists of a series of rods, each holding several [[bead]]s. Each bead represents a quantity, which is counted if the bead is moved from one end of a rod to the other. Calculations happen by manipulating the positions of beads until the final bead pattern reveals the result.<ref>{{multiref | {{harvnb|Reynolds|2008|pp=[https://books.google.com/books?id=kt9DIY1g9HYC&pg=PA1 1–2]}} | {{harvnb|Sternberg|Ben-Zeev|2012|pp=[https://books.google.com/books?id=q7F777rDl1AC&pg=PA95 95–96]}} }}</ref> Related aids include [[counting board]]s, which use tokens whose value depends on the area on the board in which they are placed,<ref>{{harvnb|Budd|Sangwin|2001|p=[https://books.google.com/books?id=x8hoAsL_JL4C&pg=PA209 209]}}</ref> and [[counting rods]], which are arranged in horizontal and vertical patterns to represent different numbers.<ref>{{multiref | {{harvnb|Knobloch|Komatsu|Liu|2013|p=[https://books.google.com/books?id=JgDFBAAAQBAJ&pg=PA123 123]}} | {{harvnb|Hodgkin|2013|p=[https://books.google.com/books?id=nSO5iMujRUYC&pg=PR168 168]}} | {{harvnb|Hart|2011|p=[https://books.google.com/books?id=zLPm3xE2qWgC&pg=PA69 69]}} }}</ref>{{efn|Some systems of counting rods include different colors to represent both positive and negative numbers.<ref>{{multiref | {{harvnb|Hodgkin|2013|p=[https://books.google.com/books?id=nSO5iMujRUYC&pg=PR168 168]}} | {{harvnb|Hart|2011|p=[https://books.google.com/books?id=zLPm3xE2qWgC&pg=PA69 69]}} }}</ref>}} [[Sector (instrument)|Sectors]] and [[slide rule]]s are more refined calculating instruments that rely on geometric relationships between different scales to perform both basic and advanced arithmetic operations.<ref>{{multiref | {{harvnb|Bruderer|2021|pp=[https://books.google.com/books?id=Gh8SEAAAQBAJ&pg=PA543 543–545, 906–907]}} | {{harvnb|Klaf|2011|pp=[https://books.google.com/books?id=YRNeBAAAQBAJ&pg=PA187 187–188]}} }}</ref>{{efn|Some computer scientists see slide rules as the first type of [[analog computer]].<ref>{{multiref | {{harvnb|Strathern|2012|p=[https://books.google.com/books?id=NJm7Z5iQE24C&pg=PP9 9]}} | {{harvnb|Lang|2015|p=[https://books.google.com/books?id=wbiKDwAAQBAJ&pg=PA160 160]}} }}</ref>}} Printed tables were particularly relevant as an aid to look up the results of operations like logarithm and [[Trigonometry|trigonometric functions]].<ref>{{harvnb|Campbell-Kelly|Croarken|Flood|Robson|2007|p=2}}</ref> [[Mechanical calculator]]s automate manual calculation processes. They present the user with some form of input device to enter numbers by turning dials or pressing keys. They include an internal mechanism usually consisting of [[gear]]s, [[lever]]s, and [[wheel]]s to perform calculations and display the results.<ref>{{multiref | {{harvnb|Lockhart|2017|pp=136, 140–146}} | {{harvnb|O'Regan|2012|pp=[https://books.google.com/books?id=QqrItgm351EC&pg=PA24 24–25]}} }}</ref> For [[electronic calculator]]s and [[computer]]s, this procedure is further refined by replacing the mechanical components with [[electronic circuits]] like [[microprocessor]]s that combine and transform electric signals to perform calculations.<ref>{{multiref | {{harvnb|Khoury|Lamothe|2016|p=[https://books.google.com/books?id=T162DAAAQBAJ&pg=PA2 2]}} | {{harvnb|Lockhart|2017|pp=147–150}} | {{harvnb|Burgin|2022|pp=[https://books.google.com/books?id=rWF2EAAAQBAJ&pg=PA119 119]}} }}</ref> === Others === [[File:Clock group.svg|thumb|alt=Diagram of modular arithmetic using a clock|Example of modular arithmetic using a clock: after adding 4 hours to 9 o'clock, the hand starts at the beginning again and points at 1 o'clock.]] There are many other types of arithmetic. [[Modular arithmetic]] operates on a finite set of numbers. If an operation would result in a number outside this finite set then the number is adjusted back into the set, similar to how the hands of clocks start at the beginning again after having completed one cycle. The number at which this adjustment happens is called the modulus. For example, a regular clock has a modulus of 12. In the case of adding 4 to 9, this means that the result is not 13 but 1. The same principle applies also to other operations, such as subtraction, multiplication, and division.<ref>{{multiref | {{harvnb|Lerner|Lerner|2008|pp=2807–2808}} | {{harvnb|Wallis|2011|pp=[https://books.google.com/books?id=18W4_LJ5bL0C&pg=PA303 303–304]}} | {{harvnb|Kaiser|Granade|2021|pp=[https://books.google.com/books?id=IxIxEAAAQBAJ&pg=PA283 283–284]}} }}</ref> Some forms of arithmetic deal with operations performed on mathematical objects other than numbers. Interval arithmetic describes operations on intervals.<ref>{{multiref | {{harvnb|Moore|Kearfott|Cloud|2009|pp=[https://books.google.com/books?id=kd8FmmN7sAoC&pg=PA10 10–11, 19]}} | {{harvnb|Pharr|Jakob|Humphreys|2023|p=[https://books.google.com/books?id=kUtwEAAAQBAJ&pg=PA1057 1057]}} }}</ref> Vector arithmetic and matrix arithmetic describe arithmetic operations on [[Vector (mathematics and physics)|vectors]] and [[Matrix (mathematics)|matrices]], like [[vector addition]] and [[matrix multiplication]].<ref>{{multiref | {{harvnb|Liebler|2018|p=[https://books.google.com/books?id=Ozb3DwAAQBAJ&pg=PA36 36]}} | {{harvnb|Adhami|Meenen|Meenen|Hite|2007|pp=[https://books.google.com/books?id=9nqkVbFPutYC&pg=PA80 80–82, 98–102]}} }}</ref> Arithmetic systems can be classified based on the numeral system they rely on. For instance, [[decimal]] arithmetic describes arithmetic operations in the decimal system. Other examples are [[Binary number|binary]] arithmetic, [[octal]] arithmetic, and [[hexadecimal]] arithmetic.<ref>{{multiref | {{harvnb|Shiva|2018|pp=3, 14}} | {{harvnb|Gupta|2019|p=[https://books.google.com/books?id=vcmcDwAAQBAJ&pg=PA3 3]}} }}</ref> Compound unit arithmetic describes arithmetic operations performed on magnitudes with compound units. It involves additional operations to govern the transformation between single unit and compound unit quantities. For example, the operation of reduction is used to transform the compound quantity 1 h 90 min into the single unit quantity 150 min.<ref>{{harvnb|Burgin|2022|pp=92–93}}</ref> Non-Diophantine arithmetics are arithmetic systems that violate traditional arithmetic intuitions and include equations like <math>1 + 1 = 1</math> and <math>2 + 2 = 5</math>.<ref>{{multiref | {{harvnb|Burgin|2022|pp=xviii–xx, xxiv, 137–138}} | {{harvnb|Caprio|Aveni|Mukherjee|2022|pp=763–764}} }}</ref> They can be employed to represent some real-world situations in modern physics and everyday life. For instance, the equation <math>1 + 1 = 1</math> can be used to describe the observation that if one raindrop is added to another raindrop then they do not remain two separate entities but become one.<ref>{{multiref | {{harvnb|Burgin|2022|p=144}} | {{harvnb|Caprio|Aveni|Mukherjee|2022|pp=763–764}} | {{harvnb|Seaman|Rossler|Burgin|2023|p=[https://books.google.com/books?id=213PEAAAQBAJ&pg=PA226 226]}} }}</ref>
Summary:
Please note that all contributions to Niidae Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
Encyclopedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Search
Search
Editing
Arithmetic
(section)
Add topic