Scientific notation
Revision as of 16:09, 11 November 2010 by imported>Clippy (Created page with ''''Scientific notation''' or exponential notation is used to express very large or small numerical values by SINGLE or DOUBLE accuracy. ''Usage:'' -9.7587E+04 or …')
Scientific notation or exponential notation is used to express very large or small numerical values by SINGLE or DOUBLE accuracy.
Usage: -9.7587E+04 or 4.6545D-9
- E denotes SINGLE precision accuracy and D denotes DOUBLE precision accuracy in Qbasic.
- To translate the notation, multiply the number preceding the letter by the value of 10 raised to the power following the letter.
- Note: Naturally calculating the value in Qbasic would return the same value expression!
Example 1: +2.184D+3 means to multiply 2.184 by 1,000 (1,000 is 10 raised to the third power, or 10 ^ 3 ).
- To multiply by 10 raised to a positive power, just move the decimal point to the right by the power number.
- The result is 2184 in DOUBLE accuracy.
Example 2: -5.412D-2 is negative 5.412 times .01 (10 raised to the -2 power or 10 ^ -2 ).
- To multiply a number by 10 raised to a negative power, just move the decimal point to the left by the number of the power.
- The result is -.05412 in DOUBLE accuracy.
Example 3: 3.07E+12 is a positive 3.07 times 1,000,000,000,000 (10 raised to the 12 power or 10 ^ 12).
- To multiply a number by 10 raised to a positive power, just move the decimal point to the left by 12.
- The result is 3,070,000,000,000 in SINGLE accuracy.
See also: