In the year 156 (772/773 AD) there came to Caliph al-Mansur a man (an Ujjain scholar by the name of Kanka) from India, an expert in hisab (computation) bringing with him a work called Sindhind (i.e. Siddhanta) concerning the motions of the planets.”The period of assimilation and syncretisation of earlier Hellenistic, Indian, and Sassanidastronomy. The first astronomical texts that were translated into Arabic were of Indian and Persian origin. The most notable of the texts was Zij al-Sindhind, an 8th-century Indian astronomical work that was translated by Muhammad ibn Ibrahim al-Fazari and Yaqub ibn Tariq after 770 CE under the supervision of an Indian astronomer who visited the court of caliph Al-Mansur in 770. Another text translated was the Zij al-Shah, a collection of astronomical tables (based on Indian parameters) compiled in Sasanid Persia over two centuries. Fragments of texts during this period indicate that Arabs adopted the sine function (inherited from India) in place of the chords of arc used in Greek trigonometry.
It is also important to note that Scholar named Al-Beruni who accompanied Mohammed of Ghazni in India expeditions- translated many of Sanskrit Hindu scientific works into Arabic and Persian(Kitab ta’rikh al-Hind).Hence ancient Muslim world of middle east can be credited for works learned from ancient Sassanid and Indian civilizations(after invasions) which travelled later to Western countries (they assumed Arabs found it because of land trade route via silk road until 15th century,after which they had direct contact with Ancient India via sea).