They use a lookup table for nπ/16, and then a polynomial to approximate the difference to other values.