In a room outside the capital of the Southern Dynasties, the floor was covered with small bamboo rods.
One rod meant one. Five rods crossed meant five. Laid out in rows, the horizontal positions counted units, hundreds and tens of thousands, while the vertical positions counted tens, thousands and hundreds of thousands.
This was the counting rod, and for a thousand years it was how Chinese mathematics was actually done.
The system was among the best in the world at the time. It had place value. It handled fractions, multiplication, division and square roots. It had no zero, so an empty position was simply left empty and the gap itself carried the meaning. It had one serious drawback: you could not walk away in the middle of a calculation, and you could not knock the table. One gust through the window and three days were gone.
So the number Zu Chongzhi wanted was not only a problem of intelligence. It was a problem of stamina, patience, and a room nobody was allowed to enter.
Zu Chongzhi sat in front of those rods for many days.
He was trying to pin down a number. Today it is called pi, and a schoolchild can get 3.14159 from a calculator in one second.
He wanted the seventh decimal place.
No paper. No pen. No Arabic numerals, no decimal point, no calculator. He had two hands, a heap of bamboo, and one method.
The method was to cut the circle.
Cutting the Circle
He did not invent it.
In 263 the mathematician Liu Hui wrote a commentary on the Nine Chapters on the Mathematical Art and set out the procedure. Draw a regular hexagon inside a circle. Double the sides: twelve, twenty four, forty eight. The more sides, the closer the polygon lies to the circle, and the closer its perimeter comes to the circumference.
Liu Hui carried the calculation to a polygon of 3072 sides and arrived at 3.1416.
That was good, and he knew it could be pushed further. He also said something very practical. At this point, he wrote, it is accurate enough for use.
Zu Chongzhi decided it was not.
He kept doubling. Six thousand one hundred and forty four sides. Twelve thousand two hundred and eighty eight. Twenty four thousand five hundred and seventy six.
Each doubling required a fresh square root. On counting rods a square root is the worst operation there is: trial quotient, subtraction, shift, repeat. The root of a nine digit number needs half a room to lay out.
And it was not one root. Every layer of the polygon needed its own side length, and each step of that needed multiplications and divisions laid out again from the beginning. By the end the numbers in his hands ran to eight or nine digits, and a single misplaced rod erased days of work.
Later scholars reconstructed the workload: to reach a polygon of 24576 sides, a man needed well over a hundred separate operations on nine digit numbers, several of them square roots. All by hand. All with sticks.
What he produced was this. The circumference is greater than 3.1415926 and less than 3.1415927.
Pi lies between those two numbers.
We now know pi as 3.14159265358979 and onward forever. The window he gave is wrong by less than one part in a hundred million.
He also gave two fractions. The approximate value, 22/7. And the dense value, 355/113.
22/7 is 3.142857, rough and convenient. 355/113 is 3.14159292, which differs from the true value in the seventh decimal place. Two integers, neither longer than three digits, and the circle is pinned almost exactly.
Western readers have a reference point for how hard this is. Archimedes, working in Syracuse in the third century BC, used a polygon of 96 sides and reached 3.1416, a result that stood in Europe for nearly two thousand years. Zu Chongzhi went from 96 sides to 24576, and from four correct digits to seven.
His figure held the world record for about a thousand years, until the Persian astronomer al-Kashi reached sixteen digits in 1424.
The fraction is worth a second look. Any decimal can be written as a fraction with a huge denominator, which is useless. What makes 355/113 remarkable is that both numbers are tiny and the error is in the seventh decimal place. Nothing with a denominator under a thousand comes close. The tool for proving that is the theory of continued fractions, which Europe developed in the seventeenth century, and which confirms fifteen hundred years later that he had found the best possible fraction of that size.

A Calendar of His Own
Pi was not his job.
His job was the calendar.
The southern court was using a calendar compiled by He Chengtian more than thirty years earlier. Errors had accumulated. The winter solstice no longer fell where the tables said it should, and eclipse predictions kept missing.
In 462 Zu finished a new one, the Daming calendar.
It changed three things.
First, it put precession into the calculation. The earth wobbles slowly on its axis, so the vernal equinox drifts westward a little every year. Chinese astronomers had noticed the drift; nobody had built it into a calendar. Zu measured it at one degree in forty five years and eleven months.
The modern value is one degree in about seventy one and a half years. He was off by more than half, but the direction was right, and he was the first man to treat the drift as something a calendar had to correct for.
Second, he replaced the leap month cycle. The old rule inserted seven leap months in nineteen years, which is simple and drifts. He proposed one hundred and forty four leap months in three hundred and ninety one years.
Third, his tropical year came out at 365.24281481 days. The modern figure is 365.2422. The difference is about fifty seconds a year.
Fifteen centuries ago. With bamboo rods.
He also gave the nodal month, the interval between two passages of the moon through the same node of its orbit, as 27.21223 days. The modern value is 27.21222.
And he computed the synodic periods of the five visible planets. Those numbers could not be measured with any instrument he had. They could only be extracted by comparing observation records accumulated over decades and centuries, which means he was working with the observations of other men as much as his own.
Show Me the Evidence
A calendar is not adopted because it is correct.
In 462 he submitted it. The emperor referred it to the court.
The strongest objection came from Dai Faxing, a favourite of the throne who controlled the palace secretariat. His argument was that the old calendar had served for centuries, and that a young man had no standing to change it. Then he added the sentence that mattered: this slanders heaven and violates the classics.
Those eight characters carried the weight that accusations of impiety carried in Europe. They were not a technical objection. They were a charge.
Zu wrote a reply.
In it there are eight characters worth remembering: I wish to hear the explicit evidence, so that reason may be checked against fact.
Which means: your word does not settle it and mine does not either. Show the data.
He took the objections one at a time. Dai Faxing said the ancient books gave a fixed length for the noon shadow at the winter solstice. Zu answered that any such figure was measured at one place in one year, that his own measurements at another place gave another number, and that the court would have to say which measurement it was defending. Dai Faxing said the positions of the stars do not change. Zu produced the recorded observations that showed they had.
He won the argument and lost the decision.
The calendar was not adopted.
Ten years after his death, in 510, his son Zu Geng submitted it for the third time, and it was finally promulgated.
Forty eight years between completion and use.
In those decades he was working on other things.
He and his son solved the volume of a sphere. The principle is a single sentence: if two solids have equal cross sectional areas at every height, their volumes are equal. With that, a sphere you cannot compute can be exchanged for a solid you can.
In the West this is called Cavalieri principle, after the Italian who stated it in the seventeenth century.
Zu Geng wrote it into a commentary on the Nine Chapters. The formula in every school textbook today starts there.
The Cart and the Boat
He also built machines.
He built a south pointing cart. A wooden figure on top kept one arm extended toward the south no matter which way the cart turned. The device existed under the Han, had been lost, and had been faked repeatedly in the centuries between, usually by hiding a man inside to turn the figure by hand.
Zu built his with a bronze gear train and a differential, no man inside. The histories say the workmanship was extremely fine and that it did not deviate however the cart turned.
He built a boat the sources call the thousand li boat and tested it on the Xinting river, where it covered more than a hundred li in a day. How it was propelled is not described; the usual reconstruction is a treadwheel driven by men.
Treadwheels were not new in the sixth century. The number is what is new. A loaded river boat of that period, worked by oars, poles and sail, made fifty or sixty li in a day. A hundred and twenty needs either a very light hull or a very efficient drive, and probably both.
He left no drawings. He left six characters: thousand li boat, a hundred li a day.
He also built a water powered trip hammer and mill, a bronze tipping vessel that stands upright when half full and overturns when full, kept on a desk as a warning, and an improved clepsydra.
A man who could pin pi to seven places, looking at a gear, saw tooth counts and ratios. Looking at a water clock, he saw head and orifice.
The Book That Vanished
He collected his mathematics into a book called the Method of Interpolation.
Its later status is hard to overstate. The Tang established a school of mathematics in the capital with ten authorised texts, and the Method of Interpolation was one of them. It was allotted four years of study, longer than any of the other nine, and it was compulsory in the state examination for mathematicians.
Then it disappeared.
By the Northern Song there were no copies. Everything we know about his value for pi comes not from his own book but from one short passage in the official history of the Sui dynasty, in the chapter on calendars and measures.
The passage records that Zu Chongzhi took a diameter of one hundred million as one zhang. It then gives the circumference as greater than three zhang one chi four cun one fen five li nine hao two miao seven hu. It gives the lower limit as the same figure one unit smaller. The true value, it says, lies between the two.
A diameter of one hundred million, taken as one unit of length. That is how he avoided decimals: he simply worked in integers large enough that the fractions became digits.
That sentence is the most valuable line in the history of Chinese mathematics, because it preserved the result of a method that no longer exists.
How he actually did it, whether by cutting the circle or by something cleverer, is still argued. Without the book there is no answer.
Why the book was lost is easier. It was too hard. The Tang school set it for four years and contemporaries still complained that nobody understood what it was saying. A text that teachers cannot explain gets copied rarely, and a rare text needs only one fire or one war.
Most Chinese mathematical books ended this way. The Nine Chapters survived because it was useful and men kept using it. The Method of Interpolation did not survive precisely because it went too deep.
Zu Chongzhi died in 500, aged seventy two.
He left a calendar that ran for eighty years, a book that is gone, and some machines that are also gone.
What is left is a string of digits.
In 1967 the International Astronomical Union named a crater on the far side of the moon after him. Earlier, the Purple Mountain Observatory had named an asteroid for him, number 1888.
Computers have now carried that number out to trillions of digits. The first seven of them were laid out one rod at a time, in a room where the floor was covered with bamboo.
He had nothing else to work with.
For fifteen hundred years, every man who went further than he did used something invented after him: Arabic numerals, decimals, paper, pens, calculators, machines.
He had sticks.