Abu al-Hasan 'Ali ibn 'Abd al-Rahman ibn Ahmad ibn Yunus al-Sadafi al-Misri (Arabic: ابن يونس; c. 950 – 1009) was an important Egyptian Muslim astronomer and mathematician, whose works are noted for being ahead of their time, having been based on meticulous calculations and attention to detail.
Information regarding his early life and education is uncertain. He was born in Egypt between 950 and 952 and came from a respected family in Fustat. His father was a historian, biographer, and scholar of hadith, who wrote two volumes about the history of Egypt—one about the Egyptians and one based on traveller commentary on Egypt. A prolific writer, Ibn Yunus' father has been described as "Egypt's most celebrated early historian and first known compiler of a biographical dictionary devoted exclusively to Egyptians". His great-grandfather had been an associate of the noted legal scholar Imam Shafi.
Early in the life of Ibn Yunus, the Fatimid dynasty came to power and the new city of Cairo was founded. In Cairo, he worked as an astronomer for the Fatimid dynasty for twenty-six years, first for the Caliph al-Aziz and then for al-Hakim. Ibn Yunus dedicated his most famous astronomical work, al-Zij al-Kabir al-Hakimi, to the latter.
As well as for his mathematics, Ibn Yunus was also known as an eccentric and a poet.
In astrology, noted for making predictions and having written the Kitab bulugh al-umniyya ("On the Attainment of Desire"), a work concerning the heliacal risings of Sirius, and on predictions concerning what day of the week the Coptic year will start on.
Ibn Yunus' most famous work in Islamic astronomy, al-Zij al-Kabir al-Hakimi (c. 1000), was a handbook of astronomical tables which contained very accurate observations, many of which may have been obtained with very large astronomical instruments. According to N. M. Swerdlow, the Zij al-Kabir al-Hakimi is "a work of outstanding originality of which just over half survives".
Yunus expressed the solutions in his zij without mathematical symbols, but Delambre noted in his 1819 translation of the Hakemite tables that two of Ibn Yunus' methods for determining the time from solar or stellar altitude were equivalent to the trigonometric identity  identified in Johannes Werner's 16th-century manuscript on conic sections. Now recognized as one of Werner's formulas, it was essential for the development of prosthaphaeresis and logarithms decades later.
Modern knowledge of the positions of the planets confirms that his description and his calculation of the distance being one-third of a degree is exactly correct. Ibn Yunus's observations on conjunctions and eclipses were used in Richard Dunthorne and Simon Newcombs' respective calculations of the secular acceleration of the moon.
Recent encyclopaedias and popular accounts claim that the tenth century astronomer Ibn Yunus used a pendulum for time measurement, despite the fact that it has been known for nearly a hundred years that this is based on nothing more than an error made in 1684 by the Savilian Professor of Astronomy at Oxford Edward Bernard.