Rationals and decimals as required in the school curriculum: Part 3. Rationals and decimals as linear functions