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×100 |
300 | 3×102 |
4321.768 | 4.321768×103 |
−53000 | −5.3×104 |
6720000000 | 6.72×109 |
0.2 | 2×10−1 |
987 | 9.87×102 |
0.00000000751 | 7.51×10−9 |
In scientific notation, nonzero numbers are written in the form
or m times ten raised to the power of n, where n is an integer, and the coefficient m 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×102 or 35×101 or 350×100.
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×102. 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×106 if it had five significant digits. If the number were known to six or seven significant figures, it would be shown as 1.23040×106 or 1.230400×106. Thus, an additional advantage of scientific notation is that the number of significant figures is unambiguous.
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.
Explicit notation | E notation |
---|---|
2×100 | 2E0 |
3×102 | 3E2 |
4.321768×103 | 4.321768E3 |
−5.3×104 | -5.3E4 |
6.72×109 | 6.72E9 |
2×10−1 | 2E-1 |
9.87×102 | 9.87E2 |
7.51×10−9 | 7.51E-9 |
Calculators and computer programs typically present very large or small numbers using scientific notation, and some can be configured to uniformly present all numbers that way. Because superscript exponents like 107 can be inconvenient to display or type, the letter "E" or "e" (for "exponent") is often used to represent "times ten raised to the power of", so that the notation m E n for a decimal significand m and integer exponent n means the same as m × 10n. For example 6.022×1023 is written as 6.022E23
or 6.022e23
, and 1.6×10−35 is written as 1.6E-35
or 1.6e-35
. While common in computer output, this abbreviated version of scientific notation is discouraged for published documents by some style guides. [2] [3]
Most popular programming languages – including Fortran, C/C++, Python, and JavaScript – use this "E" notation, which comes from Fortran and was present in the first version released for the IBM 704 in 1956. [4] The E notation was already used by the developers of SHARE Operating System (SOS) for the IBM 709 in 1958. [5] Later versions of Fortran (at least since FORTRAN IV as of 1961) also use "D" to signify double precision numbers in scientific notation, [6] and newer Fortran compilers use "Q" to signify quadruple precision. [7] The MATLAB programming language supports the use of either "E" or "D".
The ALGOL 60 (1960) programming language uses a subscript ten "10" character instead of the letter "E", for example: 6.0221023
. [8] [9] This presented a challenge for computer systems which did not provide such a character, so ALGOL W (1966) replaced the symbol by a single quote, e.g. 6.022'+23
, [10] and some Soviet Algol variants allowed the use of the Cyrillic letter "ю", e.g. 6.022ю+23
. Subsequently, the ALGOL 68 programming language provided a choice of characters: E
, e
, \
, ⊥
, or 10
. [11] The ALGOL "10" character was included in the Soviet GOST 10859 text encoding (1964), and was added to Unicode 5.2 (2009) as U+23E8⏨DECIMAL EXPONENT SYMBOL. [12]
Some programming languages use other symbols. For instance, Simula uses &
(or &&
for long), as in 6.022&23
. [13] Mathematica supports the shorthand notation 6.022*^23
(reserving the letter E
for the mathematical constant e).
The first pocket calculators supporting scientific notation appeared in 1972. [14] To enter numbers in scientific notation calculators include a button labeled "EXP" or "×10x", among other variants. The displays of pocket calculators of the 1970s did not display an explicit symbol between significand and exponent; instead, one or more digits were left blank (e.g. 6.022 23
, as seen in the HP-25), or a pair of smaller and slightly raised digits were reserved for the exponent (e.g. 6.022 23
, as seen in the Commodore PR100). In 1976, Hewlett-Packard calculator user Jim Davidson coined the term decapower for the scientific-notation exponent to distinguish it from "normal" exponents, and suggested the letter "D" as a separator between significand and exponent in typewritten numbers (for example, 6.022D23
); these gained some currency in the programmable calculator user community. [15] The letters "E" or "D" were used as a scientific-notation separator by Sharp pocket computers released between 1987 and 1995, "E" used for 10-digit numbers and "D" used for 20-digit double-precision numbers. [16] The Texas Instruments TI-83 and TI-84 series of calculators (1996–present) use a small capital E
for the separator. [17]
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 × 103 would be written as "6.022③". [18]
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. [19]
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.
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 × 10n
; 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 × 106
appended, resulting in 1.2304×106. 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.
Converting a number from scientific notation to decimal notation, first remove the × 10n
on the end, then shift the decimal separator n digits to the right (positive n) or left (negative n). The number 1.2304×106 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.
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.
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:
Next, add or subtract the significands:
An example:
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 1001b in binary (=9d) is written as 1.001b × 2d11b or 1.001b × 10b11b using binary numbers (or shorter 1.001 × 1011 if binary context is obvious).[ citation needed ] In E notation, this is written as 1.001bE11b (or shorter: 1.001E11) with the letter "E" now standing for "times two (10b) 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.001bB11b (or shorter: 1.001B11). For comparison, the same number in decimal representation: 1.125 × 23 (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.001b × 10b3d 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×210 (kibi), 1B20 for 1×220 (mebi), 1B30 for 1×230 (gibi), 1B40 for 1×240 (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.40h × 10h0h = 1.40H0 = 1.40h0, or 98000 = 2.7732o × 10o5o = 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.3DEh × 242.
Engineering notation can be viewed as a base-1000 scientific notation.
In computing, floating-point arithmetic (FP) is arithmetic on subsets of real numbers formed by a string of a fixed number of digits in some base, called a significand, scaled by an integer exponent of that base. Numbers of this form are called floating-point numbers.
Hexadecimal is a positional numeral system that represents numbers using a radix (base) of sixteen. Unlike the decimal system representing numbers using ten symbols, hexadecimal uses sixteen distinct symbols, most often the symbols "0"–"9" to represent values 0 to 9 and "A"–"F" to represent values from ten to fifteen.
A computer number format is the internal representation of numeric values in digital device hardware and software, such as in programmable computers and calculators. Numerical values are stored as groupings of bits, such as bytes and words. The encoding between numerical values and bit patterns is chosen for convenience of the operation of the computer; the encoding used by the computer's instruction set generally requires conversion for external use, such as for printing and display. Different types of processors may have different internal representations of numerical values and different conventions are used for integer and real numbers. Most calculations are carried out with number formats that fit into a processor register, but some software systems allow representation of arbitrarily large numbers using multiple words of memory.
Double-precision floating-point format is a floating-point number format, usually occupying 64 bits in computer memory; it represents a wide range of numeric values by using a floating radix point.
A decimal separator is a symbol that separates the integer part from the fractional part of a number written in decimal form. Different countries officially designate different symbols for use as the separator. The choice of symbol also affects the choice of symbol for the thousands separator used in digit grouping.
Significant figures, also referred to as significant digits or sig figs, are specific digits within a number written in positional notation that carry both reliability and necessity in conveying a particular quantity. When presenting the outcome of a measurement, if the number of digits exceeds what the measurement instrument can resolve, only the number of digits within the resolution's capability are dependable and therefore considered significant.
The IEEE Standard for Floating-Point Arithmetic is a technical standard for floating-point arithmetic originally established in 1985 by the Institute of Electrical and Electronics Engineers (IEEE). The standard addressed many problems found in the diverse floating-point implementations that made them difficult to use reliably and portably. Many hardware floating-point units use the IEEE 754 standard.
The significand is the first (left) part of a number in scientific notation or related concepts in floating-point representation, consisting of its significant digits.
In computing, a roundoff error, also called rounding error, is the difference between the result produced by a given algorithm using exact arithmetic and the result produced by the same algorithm using finite-precision, rounded arithmetic. Rounding errors are due to inexactness in the representation of real numbers and the arithmetic operations done with them. This is a form of quantization error. When using approximation equations or algorithms, especially when using finitely many digits to represent real numbers, one of the goals of numerical analysis is to estimate computation errors. Computation errors, also called numerical errors, include both truncation errors and roundoff errors.
Hexadecimal floating point is a format for encoding floating-point numbers first introduced on the IBM System/360 computers, and supported on subsequent machines based on that architecture, as well as machines which were intended to be application-compatible with System/360.
Engineering notation or engineering form (also technical notation) is a version of scientific notation in which the exponent of ten is always selected to be divisible by three to match the common metric prefixes, i.e. scientific notation that aligns with powers of a thousand, for example, 531×103 instead of 5.31×105 (but on calculator displays written without the ×10 to save space). As an alternative to writing powers of 10, SI prefixes can be used, which also usually provide steps of a factor of a thousand. On most calculators, engineering notation is called "ENG" mode as scientific notation is denoted SCI.
In applied mathematics, a number is normalized when it is written in scientific notation with one non-zero decimal digit before the decimal point. Thus, a real number, when written out in normalized scientific notation, is as follows:
In computing, minifloats are floating-point values represented with very few bits. This reduced precision makes them ill-suited for general-purpose numerical calculations, but they are useful for special purposes such as:
Extended precision refers to floating-point number formats that provide greater precision than the basic floating-point formats. Extended-precision formats support a basic format by minimizing roundoff and overflow errors in intermediate values of expressions on the base format. In contrast to extended precision, arbitrary-precision arithmetic refers to implementations of much larger numeric types using special software.
Decimal floating-point (DFP) arithmetic refers to both a representation and operations on decimal floating-point numbers. Working directly with decimal (base-10) fractions can avoid the rounding errors that otherwise typically occur when converting between decimal fractions and binary (base-2) fractions.
In computing, quadruple precision is a binary floating-point–based computer number format that occupies 16 bytes with precision at least twice the 53-bit double precision.
Single-precision floating-point format is a computer number format, usually occupying 32 bits in computer memory; it represents a wide dynamic range of numeric values by using a floating radix point.
In computing, decimal32 is a decimal floating-point computer numbering format that occupies 4 bytes (32 bits) in computer memory. Like the binary16 and binary32 formats, it is intended for memory saving storage.
In computing, decimal64 is a decimal floating-point computer numbering format that occupies 8 bytes in computer memory. It is intended for applications where it is requested to come near to schoolhouse math. In contrast to the binaryxxx datatypes the decimalxxx datatypes provide exact calculations also with decimal fractions and 'nearest, ties away from zero' rounding, in some range, to some precision, to some degree.
In computing, decimal128 is a decimal floating-point number format that occupies 128 bits in memory. Formally introduced in IEEE 754-2008, it is intended for applications where it is necessary to emulate decimal rounding exactly, such as financial and tax computations.
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.)
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.Intel Fortran: Language Reference (PDF). Intel Corporation. 2005 [2003]. pp. 3-7–3-8, 3–10. 253261-003. Retrieved 2022-12-22. (858 pages) Compaq Visual Fortran – Language Reference (PDF). Houston: Compaq Computer Corporation. August 2001. Retrieved 2022-12-22. (1441 pages) "6. Extensions: 6.1 Extensions implemented in GNU Fortran: 6.1.8 Q exponent-letter". The GNU Fortran Compiler. 2014-06-12. Retrieved 2022-12-21.
{{cite book}}
: CS1 maint: location missing publisher (link)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,"Decapower". 52-Notes – Newsletter of the SR-52 Users Club. Vol. 1, no. 6. Dayton, OH. November 1976. p. 1. Retrieved 2018-05-07. (NB. The term decapower was frequently used in subsequent issues of this newsletter up to at least 1978.)123−45
[ sic ] which is displayed in scientific notation as1.23 -43
will now be written1.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).
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.