Tian yuan shu

Tian yuan shu () is a Chinese system of algebra for polynomial equations. Some of the earliest existing writings were created in the 13th century during the Yuan dynasty. However, the tianyuanshu method was known much earlier, in the Song dynasty and possibly before.
History.
The Tianyuanshu was explained in the writings of Zhu Shijie ("Jade Mirror of the Four Unknowns") and Li Zhi ("Ceyuan haijing"), two Chinese mathematicians during the Mongol Yuan dynasty.
However, after the Ming overthrew the Mongol Yuan, Zhu and Li's mathematical works went into disuse as the Ming literati became suspicious of knowledge imported from Mongol Yuan times.
Only recently, with the advent of modern mathematics in China has the tianyuanshu been re-deciphered.
Meanwhile, "tian yuan shu" arrived in Japan, where it is called tengen-jutsu. Zhu's text "Suanxue qimeng" was deciphered and was important in the development of Japanese mathematics ("wasan") in the 17th and 18th centuries.
Description.
"Tian yuan shu" means "method of the heavenly element" or "technique of the celestial unknown". The "heavenly element" is the unknown variable, usually written in modern notation.
It is a positional system of rod numerals to represent polynomial equations. For example, is represented as
, which in Arabic numerals is 
The ("yuan") denotes the unknown , so the numerals on that line mean . The line below is the constant term () and the line above is the coefficient of the quadratic () term. The system accommodates arbitrarily high exponents of the unknown by adding more lines on top and negative exponents by adding lines below the constant term. Decimals can also be represented.
In later writings of Li Zhi and Zhu Shijie, the line order was reversed so that the first line is the lowest exponent.