His interests were in astronomy. He tried to develop a calendar and for this he investigated Diophantine equations. He is best known for authoring "Sun Tzu Suan Ching" (pinyin: "Sun Zi Suan Jing"; literally, "Sun Tzu's Calculation Classic"), which contains the Chinese remainder theorem.