<P> It is evident from the large numbers of texts that Yijing carried back with him after his 10 - year residence at Nalanda, that the Mahavihara must have featured a well - equipped library . Traditional Tibetan sources mention the existence of a great library at Nalanda named Dharmaganja (Piety Mart) which comprised three large multi-storeyed buildings, the Ratnasagara (Ocean of Jewels), the Ratnodadhi (Sea of Jewels), and the Ratnaranjaka (Jewel - adorned). Ratnodadhi was nine storeys high and housed the most sacred manuscripts including the Prajnyaparamita Sutra and the Guhyasamaja . </P> <P> The exact number of volumes in the Nalanda library is not known . But it is estimated to have been in the hundreds of thousands . The library not only collected religious manuscripts but also had texts on such subjects as grammar, logic, literature, astrology, astronomy, and medicine . The Nalanda library must have had a classification scheme which was possibly based on a text classification scheme developed by the Sanskrit linguist, Panini . Buddhist texts were most likely divided into three classes based on the Tripitaka's three main divisions: the Vinaya, Sutra, and the Abhidhamma . </P> <P> In his biography of Xuanzang, Hwui - Li states that all the students of Nalanda studied the Great Vehicle (Mahayana) as well as the works of the eighteen (Hinayana) sects of Buddhism . In addition to these, they studied other subjects such as the Vedas, Hetuvidyā (Logic), Shabdavidya (Grammar and Philology), Chikitsavidya (Medicine), the works on magic (the Atharvaveda), and Samkhya . </P> <P> Xuanzang himself studied a number of these subjects at Nalanda under Shilabhadra and others . Besides Theology and Philosophy, frequent debates and discussions necessitated competence in Logic . A student at the Mahavihara had to be well - versed in the systems of Logic associated with all the different schools of thought of the time as he was expected to defend Buddhist systems against the others . Other subjects believed to have been taught at Nalanda include law, astronomy, and city - planning . </P>

Who has written nalanda ancient seat of learning