Scientific notation
Scientific notation (also referred to as scientific form or standard index form, or standard form in the UK) is a way of expressing numbers that are too big or too small to be conveniently written in decimal form. It 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} |
4,321.768 | 4.321768×10^{3} |
−53,000 | −5.3×10^{4} |
6,720,000,000 | 6.72×10^{9} |
0.2 | 2×10^{−1} |
987 | 9.87×10^{2} |
0.000 000 007 51 | 7.51×10^{−9} |
In scientific notation, all numbers are written in the form
- m × 10^{n}
(m times ten raised to the power of n), where the exponent n is an integer, and the coefficient m is any real number. The integer n is called the order of magnitude and the real number m is called the significand or mantissa.[1] However, the term "mantissa" may cause confusion because it is the 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.
Normalized notation
Any given 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 UK), 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, as the exponent n gives the number's order of magnitude. It is 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.
Normalized scientific form is the typical form of expression of large numbers in many fields, unless an unnormalized 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
Engineering notation (often named "ENG" display mode 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 nanometers" 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 meters".
Significant figures
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 because they exist only to show the scale of the number. Therefore, 1,230,400 usually has five significant figures: 1, 2, 3, 0, and 4; the final two zeroes serve only as placeholders and add no precision to the original number.
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 place holding zeroes are no longer required. Thus 1,230,400 would become 1.2304 × 10^{6}. However, there is also the possibility that the number may be known to six or more significant figures, in which case the number would be shown as (for instance) 1.23040 × 10^{6}. Thus, an additional advantage of scientific notation is that the number of significant figures is clearer.
Estimated final digit(s)
It is customary in scientific measurements to record all the definitely known digits from the measurements, and to estimate at least one additional digit if there is any information at all available to enable the observer to make an estimate. The resulting number contains more information than it would without that extra digit(s), and it (or they) 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 notations. It is often useful to know how exact the final digit(s) are. For instance, the accepted value of the unit of elementary charge can properly be expressed as 1.6021766208(98)×10^{−19} C,[2] which is shorthand for (1.6021766208±0.0000000098)×10^{−19} C.
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 two real numbers m and 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 function e^{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.[3]
Examples and other notations
- In most popular programming languages,
6.022E23
(or6.022e23
) is equivalent to 6.022×10^{23}, and 1.6×10^{−35} would be written1.6E-35
(e.g. Ada, Analytica, C/C++, FORTRAN (since FORTRAN II as of 1958), MATLAB, Scilab, Perl, Java,[4] Python, Lua, JavaScript, and others). - After the introduction of the first pocket calculators supporting scientific notation in 1972 (HP-35, SR-10) 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[5] 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.[6]
- FORTRAN (at least since FORTRAN IV as of 1961) also uses "D" to signify double precision numbers in scientific notation.[7]
- Similar, a "D" was used by Sharp pocket computers PC-1280, PC-1470U, PC-1475, PC-1480U, PC-1490U, PC-1490UII, PC-E500, PC-E500S, PC-E550, PC-E650 and PC-U6000 to indicate 20-digit double-precision numbers in scientific notation in BASIC between 1987 and 1995.[8][9][10][11][12][13]
- The ALGOL 60 (1960) programming language uses a subscript ten "_{10}" character instead of the letter E, for example:
6.022_{10}23
.[14][15] - 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 University Algol-W required the use of a single quote, e.g. 6.02486'+23,[16] 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
or6.022_{10}23
.[17]
- Decimal Exponent Symbol is part of the Unicode Standard,[18] 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. - The TI-83 series and TI-84 Plus series of calculators use a stylized E character to display decimal exponent and the 10 character to denote an equivalent ×10^ operator.[19]
- The Simula programming language requires the use of & (or && for long), for example:
6.022&23
(or6.022&&23
).[20] - The Wolfram Language (utilized in Mathematica) allows a shorthand notation of
6.022*^23
. (Instead,E
denotes the mathematical constant e).
Order of magnitude
Scientific notation also enables simpler order-of-magnitude comparisons. A proton's mass is 0.0000000000000000000000000016726 kg. If written as 1.6726×10^{−27} kg, it is easier to compare this mass with that of an electron, given below. The order of magnitude of the ratio of the masses can be obtained by comparing the exponents instead of the more error-prone task of counting the leading zeros. In this case, −27 is larger than −31 and therefore the proton is roughly four orders of magnitude (10,000 times) more massive than the electron.
Scientific notation also avoids misunderstandings due to regional differences in certain quantifiers, such as billion, which might indicate either 10^{9} or 10^{12}.
In physics and astrophysics, the number of orders of magnitude between two numbers is sometimes referred to as "dex", a contraction of "decimal exponent". For instance, if two numbers are within 1 dex of each other, then the ratio of the larger to the smaller number is less than 10. Fractional values can be used, so if within 0.5 dex, the ratio is less than 10^{0.5}, and so on.
Use of spaces
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.[21]
Further examples of scientific notation
- An electron's mass is about 0.000000000000000000000000000000910938356 kg.[22] In scientific notation, this is written 9.10938356×10^{−31} kg (in SI units).
- The Earth's mass is about 5972400000000000000000000 kg.[23] In scientific notation, this is written 5.9724×10^{24} kg.
- The Earth's circumference is approximately 40000000 m.[24] 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 megameters).
- An inch is defined as exactly 25.4 mm. Quoting a value of 25.400 mm shows that the value is correct to the nearest micrometer. 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.
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.
- 1.234×10^{3} = 12.34×10^{2} = 123.4×10^{1} = 1234
Basic operations
Given two numbers in scientific notation,
and
Multiplication and division are performed using the rules for operation with exponentiation:
and
Some examples are:
and
Addition and subtraction require the numbers to be represented using the same exponential part, so that the significand can be simply added or subtracted:
- and with
Next, add or subtract the significands:
An example:
Other bases
While base ten is normally used for scientific notation, powers of other bases can be used too,[25] 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,[26] a shorthand notation originally proposed by Bruce Alan Martin of Brookhaven National Laboratory in 1968,[27] 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.[26]
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[28]), the letters H[26] (or h[28]) and O[26] (or o,[28] or C[26]) 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.[26]
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.[29] This notation can be produced by implementations of the printf family of functions following the C99 specification and (Single Unix Specification) IEEE Std 1003.1 POSIX standard, when using the %a or %A conversion specifiers.[29][30][31] 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.[32] Apple's Swift supports it as well.[33] It is also required by the IEEE 754-2008 binary floating-point standard. Example: 1.3DEp42 represents 1.3DE_{h} × 2^{42}.
Engineering notation can be viewed as a base-1000 scientific notation.
See also
- Binary prefix
- Positional notation
- Variable scientific notation
- Engineering notation
- Floating point
- ISO 31-0
- ISO 31-11
- Significant figure
- Suzhou numerals are written with order of magnitude and unit of measurement below the significand
- RKM code
References
- Yadin, Aharon (2016), Computer Systems Architecture, Chapman & Hall/CRC Textbooks in Computing, CRC Press, p. 68−69, ISBN 978-1482231069, archived from the original on 2016-11-22
- "CODATA Value: Elementary charge e". CODATA 2014: The NIST Reference on Constants, Units, and Uncertainty: Fundamental Physical Constants. NIST. 2014-06-25. Archived from the original on 2017-06-25. Retrieved 2017-06-25.
- Edwards, John (2009), Submission Guidelines for Authors: HPS 2010 Midyear Proceedings (PDF), McLean, Virginia: Health Physics Society, p. 5, archived (PDF) from the original on 2013-05-15, retrieved 2013-03-30
- "Primitive Data Types (The Java Tutorials > Learning the Java Language > Language Basics)". Oracle Corporation. Archived from the original on 2011-11-17. Retrieved 2012-03-06.
- Davidson, Jim (January 1976). Nelson, Richard J. (ed.). "unknown". 65 Notes. 3 (1): 4. V3N1P4.
- Vanderburgh, Richard C., ed. (November 1976). "Decapower" (PDF). 52-Notes - Newsletter of the SR-52 Users Club. 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).
Archived 2014-08-03 at the Wayback Machine (NB. The term decapower was frequently used in subsequent issues of this newsletter up to at least 1978.) - "UH Mānoa Mathematics » Fortran lesson 3: Format, Write, etc". Math.hawaii.edu. 2012-02-12. Archived from the original on 2011-12-08. Retrieved 2012-03-06.
- SHARP Taschencomputer Modell PC-1280 Bedienungsanleitung [SHARP Pocket Computer Model PC-1280 Operation Manual] (PDF) (in German). Sharp Corporation. 1987. pp. 56–60. 7M 0.8-I(TINSG1123ECZZ)(3). Archived (PDF) from the original on 2017-03-06. Retrieved 2017-03-06.
- SHARP Taschencomputer Modell PC-1475 Bedienungsanleitung [SHARP Pocket Computer Model PC-1475 Operation Manual] (PDF) (in German). Sharp Corporation. 1987. pp. 105–108, 131–134, 370, 375. Archived from the original (PDF) on 2017-02-25. Retrieved 2017-02-25.
- SHARP Pocket Computer Model PC-E500 Operation Manual. Sharp Corporation. 1989. 9G1KS(TINSE1189ECZZ).
- SHARP Taschencomputer Modell PC-E500S Bedienungsanleitung [SHARP Pocket Computer Model PC-E500S Operation Manual] (PDF) (in German). Sharp Corporation. 1995. 6J3KS(TINSG1223ECZZ). Archived (PDF) from the original on 2017-02-24. Retrieved 2017-02-24.
- 電言板5 PC-1490UII PROGRAM LIBRARY (in Japanese). 5. University Co-op. 1991. (NB. University Co-operative Archived 2017-07-27 at the Wayback Machine)
- 電言板6 PC-U6000 PROGRAM LIBRARY (in Japanese). 6. University Co-op. 1993. (NB. University Co-operative Archived 2017-07-27 at the Wayback Machine)
- Naur, Peter, ed. (1960). Report on the Algorithmic Language ALGOL 60. Copenhagen.
- 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.
- "Archived copy" (PDF). Archived (PDF) from the original on 2015-09-09. Retrieved 2017-04-08.CS1 maint: archived copy as title (link)
- "Revised Report on the Algorithmic Language Algol 68". Acta Informatica. 5: 1–236. September 1973. CiteSeerX 10.1.1.219.3999. doi:10.1007/BF00265077. Retrieved 2007-04-30.
- The Unicode Standard
- "Archived copy" (PDF). Archived (PDF) from the original on 2010-02-14. Retrieved 2010-03-09.CS1 maint: archived copy as title (link)
- "SIMULA standard as defined by the SIMULA Standards Group - 3.1 Numbers". August 1986. Archived from the original on 2011-07-24. Retrieved 2009-10-06.
- Samples of usage of terminology and variants: "Archived copy" (PDF). Archived (PDF) from the original on 2008-12-17. Retrieved 2015-08-19.CS1 maint: archived copy as title (link), , "Archived copy". Archived from the original on 2007-04-04. Retrieved 2007-04-07.CS1 maint: archived copy as title (link), "Archived copy". Archived from the original on 2007-02-25. Retrieved 2007-04-07.CS1 maint: archived copy as title (link), , Archived 2015-05-03 at the Wayback Machine
- Mohr, Peter J.; Newell, David B.; Taylor, Barry N. (July–September 2016). "CODATA recommended values of the fundamental physical constants: 2014". Reviews of Modern Physics. 88 (3): 035009. arXiv:1507.07956. Bibcode:2016RvMP...88c5009M. CiteSeerX 10.1.1.150.1225. doi:10.1103/RevModPhys.88.035009. Archived from the original on 2017-01-23.
- Luzum, Brian; Capitaine, Nicole; Fienga, Agnès; Folkner, William; Fukushima, Toshio; Hilton, James; Hohenkerk, Catherine; Krasinsky, George; Petit, Gérard; Pitjeva, Elena; Soffel, Michael; Wallace, Patrick (August 2011). "The IAU 2009 system of astronomical constants: The report of the IAU working group on numerical standards for Fundamental Astronomy". Celestial Mechanics and Dynamical Astronomy. 110 (4): 293–304. Bibcode:2011CeMDA.110..293L. doi:10.1007/s10569-011-9352-4.
- Various (2000). Lide, David R. (ed.). Handbook of Chemistry and Physics (81st ed.). CRC. ISBN 978-0-8493-0481-1.
- electronic hexadecimal calculator/converter SR-22 (PDF) (Revision A ed.). Texas Instruments Incorporated. 1974. p. 7. 1304-389 Rev A. Archived (PDF) from the original on 2017-03-20. Retrieved 2017-03-20. (NB. This calculator supports floating point numbers in scientific notation in bases 8, 10 and 16.)
- Schwartz, Jake; Grevelle, Rick (2003-10-20) [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.)
- Martin, Bruce Alan (October 1968). "Letters to the editor: On binary notation". Communications of the ACM. 11 (10): 658. Bibcode:1985CACM...28...22S. doi:10.1145/364096.364107.
- Schwartz, Jake; Grevelle, Rick (2003-10-21). HP16C Emulator Library for the HP48 - Addendum to the Operator's Manual. 1.20 (1 ed.). Archived from the original on 2016-06-21. Retrieved 2015-08-15.
- "Rationale for International Standard - Programming Languages - C" (PDF). 5.10. April 2003. pp. 52, 153–154, 159. Archived (PDF) from the original on 2016-06-06. Retrieved 2010-10-17.
- The IEEE and The Open Group (2013) [2001]. "dprintf, fprintf, printf, snprintf, sprintf - print formatted output". The Open Group Base Specifications (Issue 7, IEEE Std 1003.1, 2013 ed.). Archived from the original on 2016-06-21. Retrieved 2016-06-21.
- Beebe, Nelson H. F. (2017-08-22). The Mathematical-Function Computation Handbook - Programming Using the MathCW Portable Software Library (1 ed.). Salt Lake City, UT, USA: Springer International Publishing AG. doi:10.1007/978-3-319-64110-2. ISBN 978-3-319-64109-6. LCCN 2017947446.
- "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.
- "The Swift Programming Language (Swift 3.0.1)". Guides and Sample Code: Developer: Language Reference. Apple Corporation. Lexical Structure. Archived from the original on 2017-03-11. Retrieved 2017-03-11.
External links
Look up scientific notation in Wiktionary, the free dictionary. |
- Decimal to Scientific Notation Converter
- Scientific Notation to Decimal Converter
- Scientific Notation in Everyday Life
- An exercise in converting to and from scientific notation
- Scientific Notation Converter
- Scientific Notation chapter from Lessons In Electric Circuits Vol 1 DC free ebook and Lessons In Electric Circuits series.