A fast approximation to the sine function

A function approximating the sine function is given which was designed for high speed when coded into a computer routine. The domain is divided into a small number of intervals and in each of these a straight line approximation is used. The slopes of the straight line segments have denominators which are powers of 2, and so an implementation needs no floating point multiplication or division operations. With [0, 1/2£] divided into only four intervals, an absolute error of about 0.013 is achieved by a routine taking just over a third of the time used by a more conventional one. Such accuracy is adequate for certain graphics applications, especially moving displays.