Liu Hui's {{pi}} algorithm was one of his most important contributions to ancient Chinese mathematics. It was based on calculation of {{math|N}}-gon area, in contrast to the Archimedean algorithm based on polygon circumference. Archimedes used a circumscribed 96-gon to obtain an upper limit <math>\pi <22/7=3.142857</math>, and an inscribed 96-gon to obtain the lower limit <math>223/71=3.140845</math>. Liu Hui was able to obtain both his upper limit 3.142704 and lower limit 3.141024 with only an inscribed 96-gon. Furthermore, both the Liu Hui limits were tighter than Archimedes's: 3.140845 < 3.141024 < {{pi}} < 3.142704 < 3.142857. With histhis method Zu Chongzhi obtained the eight-digit result: 3.1415926 < {{pi}} < 3.1415927, which held the world record for the most accurate value of {{pi}} for 1200 years, even by 1600 in Europe, mathematician [[Adriaan Anthonisz]] and his son obtained {{pi}} value of 3.1415929, accurate only to 7 digits.<ref>Robert Temple, The Genius of China, a refined value of pi, p144-145, {{isbn|1-85375-292-4}}</ref>