\newcommand{\exponentColor}[1]{\color{purple}{#1}}\newcommand{\leadingColor}[1]{\color{green}{#1}}
Express this number in scientific notation.
PRETTY_DECIMAL
\times 10
E
There are \exponentColor{E}
digits to the right of the leading \leadingColor{LEADING}
(and to the left of the decimal).
Count the zeroes to the right of the decimal point before the leading \leadingColor{LEADING}
: there is 1 zeroare (E + 1) * -1
zeroes.
If you count the leading digit \leadingColor{LEADING}
and those zeroes and the 1 zero, there is \exponentColor{E * -1}
digit to the right of the decimal point.
If you count the leading digit \leadingColor{LEADING}
and those zeroes and the 1 zero, there are \exponentColor{E * -1}
digits to the right of the decimal point.
So: PRETTY_DECIMAL = \leadingColor{LEADING}TRAIL \times 10^{\exponentColor{E}}
SCIENTIFIC = {?}
DECIMAL
SCIENTIFIC = BASE_STR \times TEN_POWER
BASE_STR \times TEN_POWER = PRETTY_DECIMAL