Data Representation and Numerics — Junior¶
Fixed-width integers have ranges; signed integers commonly use two’s complement. IEEE 754 floating point approximates most decimal fractions. Unicode code points become bytes through encodings such as UTF-8.
Use decimal/fixed-point rules for money, explicit encodings at I/O boundaries, and test minimum, maximum, zero, NaN, infinity, and non-ASCII text.
Test yourself¶
- Why can integer overflow wrap or trap?
- Why is
0.1approximate? - Are code points the same as user-visible characters?
Continue to middle.md.