Source: http://users.nccs.gov/~fwang2/tools/c.pdf