Method of writing numbers with a large amount of digits
Scientific notation is a way of expressing numbers that are too large or too small to be conveniently written in decimal form, since to do so would require writing out an inconveniently long string of digits. It may be referred to as scientific form or standard index form, or standard form in the United Kingdom. This base ten notation is commonly used by scientists, mathematicians, and engineers, in part because it can simplify certain arithmetic operations. On scientific calculators it is usually known as "SCI" display mode.
Decimal notation
Scientific notation
2
2×10^{0}
300
3×10^{2}
4321.768
4.321768×10^{3}
−53000
−5.3×10^{4}
6720000000
6.72×10^{9}
0.2
2×10^{−1}
987
9.87×10^{2}
0.00000000751
7.51×10^{−9}
0.00000000006673
6.673×10^{−11}
In scientific notation, nonzero numbers are written in the form
m × 10^{n}
or m times ten raised to the power of n, where n is an integer, and the coefficientm is a nonzero real number (usually between 1 and 10 in absolute value, and nearly always written as a terminating decimal). The integer n is called the exponent and the real number m is called the significand or mantissa.^{[1]} The term "mantissa" can be ambiguous where logarithms are involved, because it is also the traditional name of the fractional part of the common logarithm. If the number is negative then a minus sign precedes m, as in ordinary decimal notation. In normalized notation, the exponent is chosen so that the absolute value (modulus) of the significand m is at least 1 but less than 10.
Decimal floating point is a computer arithmetic system closely related to scientific notation.
Any real number can be written in the form m×10^^{n} in many ways: for example, 350 can be written as 3.5×10^{2} or 35×10^{1} or 350×10^{0}.
In normalized scientific notation (called "standard form" in the United Kingdom), the exponent n is chosen so that the absolute value of m remains at least one but less than ten (1 ≤ |m| < 10). Thus 350 is written as 3.5×10^{2}. This form allows easy comparison of numbers: numbers with bigger exponents are (due to the normalization) larger than those with smaller exponents, and subtraction of exponents gives an estimate of the number of orders of magnitude separating the numbers. It is also the form that is required when using tables of common logarithms. In normalized notation, the exponent n is negative for a number with absolute value between 0 and 1 (e.g. 0.5 is written as 5×10^{−1}). The 10 and exponent are often omitted when the exponent is 0. For a series of numbers that are to be added or subtracted (or otherwise compared), it can be convenient to use the same value of m for all elements of the series.
Normalized scientific form is the typical form of expression of large numbers in many fields, unless an unnormalized or differently normalized form, such as engineering notation, is desired. Normalized scientific notation is often called exponential notation—although the latter term is more general and also applies when m is not restricted to the range 1 to 10 (as in engineering notation for instance) and to bases other than 10 (for example, 3.15×2^^{20}).
Engineering notation (often named "ENG" on scientific calculators) differs from normalized scientific notation in that the exponent n is restricted to multiples of 3. Consequently, the absolute value of m is in the range 1 ≤ |m| < 1000, rather than 1 ≤ |m| < 10. Though similar in concept, engineering notation is rarely called scientific notation. Engineering notation allows the numbers to explicitly match their corresponding SI prefixes, which facilitates reading and oral communication. For example, 12.5×10^{−9} m can be read as "twelve-point-five nanometres" and written as 12.5 nm, while its scientific notation equivalent 1.25×10^{−8} m would likely be read out as "one-point-two-five times ten-to-the-negative-eight metres".
A significant figure is a digit in a number that adds to its precision. This includes all nonzero numbers, zeroes between significant digits, and zeroes indicated to be significant.
Leading and trailing zeroes are not significant digits, because they exist only to show the scale of the number. Unfortunately, this leads to ambiguity. The number 1230400 is usually read to have five significant figures: 1, 2, 3, 0, and 4, the final two zeroes serving only as placeholders and adding no precision. The same number, however, would be used if the last two digits were also measured precisely and found to equal 0 — seven significant figures.
When a number is converted into normalized scientific notation, it is scaled down to a number between 1 and 10. All of the significant digits remain, but the placeholding zeroes are no longer required. Thus 1230400 would become 1.2304×10^{6} if it had five significant digits. If the number were known to six or seven significant figures, it would be shown as 1.23040×10^{6} or 1.230400×10^{6}. Thus, an additional advantage of scientific notation is that the number of significant figures is unambiguous.
Estimated final digits
It is customary in scientific measurement to record all the definitely known digits from the measurement and to estimate at least one additional digit if there is any information at all available on its value. The resulting number contains more information than it would without the extra digit, which may be considered a significant digit because it conveys some information leading to greater precision in measurements and in aggregations of measurements (adding them or multiplying them together).
Additional information about precision can be conveyed through additional notation. It is often useful to know how exact the final digit or digits are. For instance, the accepted value of the mass of the proton can properly be expressed as 1.67262192369(51)×10^{−27} kg, which is shorthand for (1.67262192369±0.00000000051)×10^{−27} kg. However it is still unclear whether the error (5.1 × 10^{−37} in this case) is the maximum possible error, standard error, or some other confidence interval.
E notation
Most calculators and many computer programs present very large and very small results in scientific notation, typically invoked by a key labelled EXP (for exponent), EEX (for enter exponent), EE, EX, E, or ×10^{x} depending on vendor and model. Because superscripted exponents like 10^{7} cannot always be conveniently displayed, the letter E (or e) is often used to represent "times ten raised to the power of" (which would be written as "× 10^{n}") and is followed by the value of the exponent; in other words, for any real number m and integer n, the usage of "mEn" would indicate a value of m × 10^{n}. In this usage the character e is not related to the mathematical constant e or the exponential functione^{x} (a confusion that is unlikely if scientific notation is represented by a capital E). Although the E stands for exponent, the notation is usually referred to as (scientific) E notation rather than (scientific) exponential notation. The use of E notation facilitates data entry and readability in textual communication since it minimizes keystrokes, avoids reduced font sizes and provides a simpler and more concise display, but it is not encouraged in some publications.^{[2]}
Examples and other notations
Since its first version released for the IBM 704 in 1956, the Fortran language has used E notation for floating point numbers.^{[3]} It was not part of the preliminary specification as of 1954.^{[4]}
After the introduction of the first pocket calculators supporting scientific notation in 1972 (HP-35, SR-10^{[7]}) the term decapower was sometimes used in the emerging user communities for the power-of-ten multiplier in order to better distinguish it from "normal" exponents. Likewise, the letter "D" was used in typewritten numbers. This notation was proposed by Jim Davidson and published in the January 1976 issue of Richard J. Nelson's Hewlett-Packard newsletter 65 Notes^{[8]} for HP-65 users, and it was adopted and carried over into the Texas Instruments community by Richard C. Vanderburgh, the editor of the 52-Notes newsletter for SR-52 users in November 1976.^{[9]}
The displays of LED pocket calculators did not display an "E" or "e". Instead, one or more digits were left blank between the significand and the exponent (e.g. 6.022 23, such as in the Hewlett-Packard HP-25), or a pair of smaller and slightly raised digits reserved for the exponent was used (e.g. 6.022 ^{23}, such as in the Commodore PR100).
Fortran (at least since FORTRAN IV as of 1961) also uses "D" to signify double precision numbers in scientific notation.^{[10]}
Some newer FORTRAN compilers like DEC FORTRAN 77 (f77),^{[17]}Intel Fortran,^{[18]} Compaq/Digital Visual Fortran^{[19]} or GNU Fortran (gfortran) support "Q" to signify quadruple precision numbers in scientific notation.^{[20]}
MATLAB supports both letters, "E" and "D", to indicate numbers in scientific notation.
The ALGOL 60 (1960) programming language uses a subscript ten "_{10}" character instead of the letter E, for example: 6.022_{10}23.^{[21]}^{[22]}
The use of the "_{10}" in the various Algol standards provided a challenge on some computer systems that did not provide such a "_{10}" character. As a consequence Stanford UniversityAlgol-W required the use of a single quote, e.g. 6.022'+23,^{[23]} and some Soviet Algol variants allowed the use of the Cyrillic character "ю" character, e.g. 6.022ю+23.
Subsequently, the ALGOL 68 programming language provided the choice of 4 characters: E, e, \, or _{10}. By examples: 6.022E23, 6.022e23, 6.022\23 or 6.022_{10}23.^{[24]}
Decimal Exponent Symbol is part of the Unicode Standard,^{[25]} e.g. 6.022⏨23. It is included as U+23E8⏨DECIMAL EXPONENT SYMBOL to accommodate usage in the programming languages Algol 60 and Algol 68.
in 1962, Ronald O. Whitaker of Rowco Engineering Co. proposed a power-of-ten system nomenclature where the exponent would be circled, e.g. 6.022 × 10^{3} would be written as "6.022③".^{[26]}
In normalized scientific notation, in E notation, and in engineering notation, the space (which in typesetting may be represented by a normal width space or a thin space) that is allowed only before and after "×" or in front of "E" is sometimes omitted, though it is less common to do so before the alphabetical character.^{[29]}
Further examples of scientific notation
An electron's mass is about 0.000000000000000000000000000000910938356 kg.^{[30]} In scientific notation, this is written 9.10938356×10^{−31} kg (in SI units).
The Earth's mass is about 5972400000000000000000000 kg.^{[31]} In scientific notation, this is written 5.9724×10^{24} kg.
The Earth's circumference is approximately 40000000 m.^{[32]} In scientific notation, this is 4×10^{7} m. In engineering notation, this is written 40×10^{6} m. In SI writing style, this may be written 40 Mm (40 megametres).
An inch is defined as exactly25.4 mm. Quoting a value of 25.400 mm shows that the value is correct to the nearest micrometre. An approximated value with only two significant digits would be 2.5×10^{1} mm instead. As there is no limit to the number of significant digits, the length of an inch could, if required, be written as (say) 2.54000000000×10^{1} mm instead.
Hyperinflation is a problem that is caused when too much money is printed with regards to there being too few commodities, causing the inflation rate to rise by 50% or more in a single month; currencies tend to lose their intrinsic value over time. Some countries have had an inflation rate of 1 million percent or more in a single month, which usually results in the abandonment of the country's currency shortly afterwards. In November 2008, the monthly inflation rate of the Zimbabwean dollar reached 79.6 billion percent; the approximated value with three significant figures would be 7.96×10^{10} %.^{[33]}^{[34]}
Converting numbers
Converting a number in these cases means to either convert the number into scientific notation form, convert it back into decimal form or to change the exponent part of the equation. None of these alter the actual number, only how it's expressed.
Decimal to scientific
First, move the decimal separator point sufficient places, n, to put the number's value within a desired range, between 1 and 10 for normalized notation. If the decimal was moved to the left, append × 10^{n}; to the right, × 10^{−n}. To represent the number 1,230,400 in normalized scientific notation, the decimal separator would be moved 6 digits to the left and × 10^{6} appended, resulting in 1.2304×10^{6}. The number −0.0040321 would have its decimal separator shifted 3 digits to the right instead of the left and yield −4.0321×10^{−3} as a result.
Scientific to decimal
Converting a number from scientific notation to decimal notation, first remove the × 10^{n} on the end, then shift the decimal separator n digits to the right (positive n) or left (negative n). The number 1.2304×10^{6} would have its decimal separator shifted 6 digits to the right and become 1,230,400, while −4.0321×10^{−3} would have its decimal separator moved 3 digits to the left and be −0.0040321.
Exponential
Conversion between different scientific notation representations of the same number with different exponential values is achieved by performing opposite operations of multiplication or division by a power of ten on the significand and an subtraction or addition of one on the exponent part. The decimal separator in the significand is shifted x places to the left (or right) and x is added to (or subtracted from) the exponent, as shown below.
Addition and subtraction require the numbers to be represented using the same exponential part, so that the significand can be simply added or subtracted:
$x_{0}=m_{0}\times 10^{n_{0))$ and $x_{1}=m_{1}\times 10^{n_{1))$ with $n_{0}=n_{1))$
While base ten is normally used for scientific notation, powers of other bases can be used too,^{[35]} base 2 being the next most commonly used one.
For example, in base-2 scientific notation, the number 1001_{b} in binary (=9_{d}) is written as
1.001_{b} × 2_{d}^{11b} or 1.001_{b} × 10_{b}^{11b} using binary numbers (or shorter 1.001 × 10^{11} if binary context is obvious). In E notation, this is written as 1.001_{b}E11_{b} (or shorter: 1.001E11) with the letter E now standing for "times two (10_{b}) to the power" here. In order to better distinguish this base-2 exponent from a base-10 exponent, a base-2 exponent is sometimes also indicated by using the letter B instead of E,^{[36]} a shorthand notation originally proposed by Bruce Alan Martin of Brookhaven National Laboratory in 1968,^{[37]} as in 1.001_{b}B11_{b} (or shorter: 1.001B11). For comparison, the same number in decimal representation: 1.125 × 2^{3} (using decimal representation), or 1.125B3 (still using decimal representation). Some calculators use a mixed representation for binary floating point numbers, where the exponent is displayed as decimal number even in binary mode, so the above becomes 1.001_{b} × 10_{b}^{3d} or shorter 1.001B3.^{[36]}
This is closely related to the base-2 floating-point representation commonly used in computer arithmetic, and the usage of IEC binary prefixes (e.g. 1B10 for 1×2^{10} (kibi), 1B20 for 1×2^{20} (mebi), 1B30 for 1×2^{30} (gibi), 1B40 for 1×2^{40} (tebi)).
Similar to B (or b^{[38]}), the letters H^{[36]} (or h^{[38]}) and O^{[36]} (or o,^{[38]} or C^{[36]}) are sometimes also used to indicate times 16 or 8 to the power as in 1.25 = 1.40_{h} × 10_{h}^{0h} = 1.40H0 = 1.40h0, or 98000 = 2.7732_{o} × 10_{o}^{5o} = 2.7732o5 = 2.7732C5.^{[36]}
Another similar convention to denote base-2 exponents is using a letter P (or p, for "power"). In this notation the significand is always meant to be hexadecimal, whereas the exponent is always meant to be decimal.^{[39]} This notation can be produced by implementations of the printf family of functions following the C99 specification and (Single Unix Specification) IEEE Std 1003.1POSIX standard, when using the %a or %A conversion specifiers.^{[39]}^{[40]}^{[41]} Starting with C++11, C++ I/O functions could parse and print the P notation as well. Meanwhile, the notation has been fully adopted by the language standard since C++17.^{[42]}Apple's Swift supports it as well.^{[43]} It is also required by the IEEE 754-2008 binary floating-point standard. Example: 1.3DEp42 represents 1.3DE_{h} × 2^{42}.
^Caliò, Franca; Alessandro, Lazzari (September 2017). Elements of Mathematics with Numerical Applications. Società Editrice Esculapio. pp. 30–32. ISBN978-8-89385052-0.
^DiGri, Vincent J.; King, Jane E. (April 1959) [1958-06-11]. "The SHARE 709 System: Input-Output Translation". Journal of the ACM. 6 (2): 141–144. doi:10.1145/320964.320969. S2CID19660148. It tells the input translator that the field to be converted is a decimal number of the form ~X.XXXXE ± YY where E implies that the value of ~x.xxxx is to be scaled by ten to the ±YY power. (4 pages) (NB. This was presented at the ACM meeting 11–13 June 1958.)
^Davidson, Jim (January 1976). Nelson, Richard J. (ed.). "unknown". 65 Notes. Santa Ana, California, USA. 3 (1): 4. V3N1P4. ((cite journal)): Cite uses generic title (help)
^Vanderburgh, Richard C., ed. (November 1976). "Decapower"(PDF). 52-Notes - Newsletter of the SR-52 Users Club. Dayton, Ohio, USA. 1 (6): 1. V1N6P1. Archived(PDF) from the original on 2017-05-28. Retrieved 2017-05-28. Decapower - In the January 1976 issue of 65-Notes (V3N1p4) Jim Davidson (HP-65 Users Club member #547) suggested the term "decapower" as a descriptor for the power-of-ten multiplier used in scientific notation displays. I'm going to begin using it in place of "exponent" which is technically incorrect, and the letter D to separate the "mantissa" from the decapower for typewritten numbers, as Jim also suggests. For example, 123^{−45} [sic] which is displayed in scientific notation as 1.23 -43 will now be written 1.23D-43. Perhaps, as this notation gets more and more usage, the calculator manufacturers will change their keyboard abbreviations. HP's EEX and TI's EE could be changed to ED (for enter decapower).[1]"Decapower". 52-Notes - Newsletter of the SR-52 Users Club. Vol. 1, no. 6. Dayton, Ohio, USA. November 1976. p. 1. Archived from the original on 2014-08-03. Retrieved 2018-05-07. (NB. The term decapower was frequently used in subsequent issues of this newsletter up to at least 1978.)
^ 電言板5 PC-1490UII PROGRAM LIBRARY [Telephone board 5 PC-1490UII program library] (in Japanese). Vol. 5. University Co-op. 1991. (NB. "University Co-operative". Archived from the original on 2017-07-27..)
^ 電言板6 PC-U6000 PROGRAM LIBRARY [Telephone board 6 PC-U6000 program library] (in Japanese). Vol. 6. University Co-op. 1993. (NB. "University Co-operative". Archived from the original on 2017-07-27..)
^"Double Precision, REAL**16". DEC Fortran 77 Manual. Digital Equipment Corporation. Archived from the original on 2019-11-18. Retrieved 2022-12-21. Digital Fortran 77 also allows the syntax Qsnnn, if the exponent field is within the T_floating double precision range. […] A REAL*16 constant is a basic real constant or an integer constant followed by a decimal exponent. A decimal exponent has the form: Qsnn […] s is an optional sign […] nn is a string of decimal digits […] This type of constant is only available on Alpha systems.
^"6. Extensions: 6.1 Extensions implemented in GNU Fortran: 6.1.8 Q exponent-letter". The GNU Fortran Compiler. 2014-06-12. Archived from the original on 2022-12-21. Retrieved 2022-12-21.
^Naur, Peter, ed. (1960). Report on the Algorithmic Language ALGOL 60. Copenhagen.((cite book)): CS1 maint: location missing publisher (link)
^Savard, John J. G. (2018) [2005]. "Computer Arithmetic". quadibloc. The Early Days of Hexadecimal. Archived from the original on 2018-07-16. Retrieved 2018-07-16.
^ ^{a}^{b}^{c}^{d}^{e}^{f}Schwartz, Jake; Grevelle, Rick (2003-10-20) [April 1993]. HP16C Emulator Library for the HP48S/SX. 1.20 (1 ed.). Archived from the original on 2016-06-21. Retrieved 2015-08-15. (NB. This library also works on the HP 48G/GX/G+. Beyond the feature set of the HP-16C, this package also supports calculations for binary, octal, and hexadecimal floating-point numbers in scientific notation in addition to the usual decimal floating-point numbers.)
^"floating point literal". cppreference.com. Archived from the original on 2017-04-29. Retrieved 2017-03-11. The hexadecimal floating-point literals were not part of C++ until C++17, although they can be parsed and printed by the I/O functions since C++11: both C++ I/O streams when std::hexfloat is enabled and the C I/O streams: std::printf, std::scanf, etc. See std::strtof for the format description.