3.1e3 == 3.1 * 10^3
[1] TRUE
Scientific notation is used to express very large or very small numbers in a concise format using exponents of 10 (\(10^n\)). So, rather than having to show all of the digits for \(4,600,000,000\) (4.6 Trillion) it can be expressed in scientific notation: \(4.6 \times 10^9\). Likewise, very small numbers can be expressed using the same format, e.g. \(0.0000005\) = \(5.0 \times 10^{-7}\).
Note: for numbers larger than one the exponent is positive (\(10^9\)) and for numbers less than one the exponent is negative (\(10^{-7}\))
e values are used to express scientific notation within R (and other programming languages) and essentially the \(\text{e}\) replaces the \(\times 10\) part of the notation.
For example, \(3.1\text{e}3\) is the same as \(3.1 \times 10^3\) (which is the same as 3100):
Likewise, \(2.5\text{e-}3\) is the same as \(2.5 \times 10^{-3}\) (which is the same as .0025):
However, if you would like to turn off scientific notation in R you can type:
Which is bigger?
viewof scientific_notation_1_response = Inputs.radio(['3.1e3','310']);
correct_scientific_notation_1 = '3.1e';
scientific_notation_1_result = {
if(scientific_notation_1_response == correct_scientific_notation_1){
return 'Correct!';
} else {
return 'Incorrect or incomplete.';
};
}
Which is bigger?
viewof scientific_notation_2_response = Inputs.radio(['2.5 * 10^-3',' .00025']);
correct_scientific_notation_2 = '2.5 * 10^-3';
scientific_notation_2_result = {
if(scientific_notation_2_response == correct_scientific_notation_2){
return 'Correct!';
} else {
return 'Incorrect or incomplete.';
};
}