Index Ai Academy
Foundation · Foundation mathNumbers

Very big and very small numbers

About 36 minLooking ahead: some prerequisites aren't done yet

Why this matters

AI work mixes numbers of wildly different sizes: billions of parameters, learning rates of a few ten-thousandths, tiny numbers added to keep a division safe. Written out in full they're hard to read and easy to get wrong by a zero or two. Scientific notation writes each one as a small number times a power of ten, so sizes can be read, compared and multiplied at a glance. Python writes it with an e, as in 3e-4.

  • Write numbers in scientific notation, a × 10ᵏ, and back again
  • Compare and rank numbers by order of magnitude, and know the prefixes from nano to tera
  • Read and write e-notation in Python, and find an order of magnitude with math.log10
  • Work out a model's memory from its parameter count, and compare learning rates
Quick check
Have a guess before you start. Which is bigger: 3 × 10⁻⁴ or 2 × 10⁻³?

The math: powers of ten

Purpose. Write any number, however big or small, as a short number times a power of ten.

Powers of ten are ones with zeros: 10³ = 1,000 and 10⁶ = 1,000,000. With negative exponents they're one over: 10⁻³ = 1/1,000 = 0.001.

A number in scientific notation is written a × 10ᵏ, where a is at least 1 and less than 10:

4,500,000=4.5×1060.00034=3.4×10−44{,}500{,}000 = 4.5 \times 10^{6} \qquad 0.00034 = 3.4 \times 10^{-4}

In plain words: move the decimal point until one digit that isn't zero sits in front of it. The power of ten counts the moves: positive for a big number, negative for a small one.