Day 02·Data types, integer overflow & precision
Lecture·1 / 22
Why this day exists
Yesterday our calculator worked with small prices.
A shop can sell many items. A game can count billions of points. The same calculation should still mean the same thing.
But a program has limited space for each number.
An answer can go wrong even when every input looks reasonable. It can also lose the fractional part before you print it.
We need to notice where the value changes, and choose how it is represented before that happens.
1 of 42 total|←/→ navigateEsc esc to exit