1. An electronically-implemented method of compensating for a temperature offset in a crystal reference signal, the method comprising: obtaining an indication of a temperature; computing a temperature compensation value based on the indication of temperature and three values of a piecewise linear temperature compensation approximation, the piecewise linear temperature compensation approximation representing an approximation of frequency error of a crystal reference signal originating from a crystal over temperature as at least three linear segments, wherein said computing comprises using an algorithm for computing temperature compensation values on each of the three linear segments based on the same three values; and compensating for a temperature offset in the crystal reference signal by adjusting a division ratio of a fractional divider in a phase-locked loop based on the temperature compensation value, the phase-locked loop configured to lock a phase of a frequency divided version of an output signal of the phase-locked loop to the crystal reference signal.