We deal with the problem of efficient and accurate digital computation of the samples of the linear canonical transform (LCT) of a function, from the samples of the original function. Two approaches are presented and compared. The first is based on decomposition of the LCT into chirp multiplication, Fourier transformation, and scaling operations. The second is based on decomposition of the LCT into a fractional Fourier transform followed by scaling and chirp multiplication. Both algorithms take similar to N log N time, where N is the time-bandwidth product of the signals. The only essential deviation from exactness arises from the approximation of a continuous Fourier transform with the discrete Fourier transform. Thus, the algorithms compute LCTs with a performance similar to that of the fast Fourier transform algorithm in computing the Fourier transform, both in terms of speed and accuracy.