In the last decades of the tenth century an astronomer in the new city of Cairo watched planets meet, timed eclipses and wrote an astronomical handbook so long it was named the large one. His name also became attached to something more lasting: a body of tables that let the timekeepers of Cairo find the hour, and the times of prayer, from a single measurement of the sun. Those tables were still in use in the 19th century. How much of them he computed himself is one of several things about Ibn Yunus that historians still question.
A life in outline
Abu al-Hasan Ali ibn Abd al-Rahman ibn Yunus al-Sadafi died in Egypt in 1009. The historian of science David A. King, who wrote his 1972 doctoral thesis at Yale on Ibn Yunus’s astronomy, says that nothing of consequence is known of his early life or education. He came from a respected family: his great-grandfather Yunus had been a companion of the legal scholar al-Shafii, and his father Abd al-Rahman was a well known historian (King, Dictionary of Scientific Biography).
As a young man he saw the Fatimid conquest of Egypt and the founding of Cairo in 969. He observed through the reign of the caliph al-Aziz, roughly 977 to 996, and his work was renewed by order of al-Hakim, who succeeded at the age of eleven in 996 and was much interested in astrology. His recorded observations end in 1003 (King, Biographical Encyclopedia of Astronomers).
Both King and the MacTutor biography at the University of St Andrews place his death at Fustat, the old city beside Cairo. MacTutor also gives a year of birth, 950 (O’Connor and Robertson, MacTutor); King’s entries give none, consistent with his statement that his early life is unknown, so the 950 is best read as an estimate.
The Hakimi handbook
His major work was al-Zij al-Hakimi al-kabir, the large Hakimi zij, a zij being a handbook of astronomical tables with instructions for using them. It was dedicated to al-Hakim and ran to 81 chapters. King reports that the text of the first 44 chapters alone is twice as long as the whole of al-Battani’s handbook, with more than twice as many tables, and that only parts survive, in manuscripts at Leiden and Oxford and an abridgment in Paris (King, DSB).
Unlike any other surviving zij, it opens with a list of observations, his own and his predecessors’, quoted from their works. Ibn Yunus meant it to replace a handbook made for the caliph al-Mamun in Baghdad almost 200 years earlier, and he often set what he saw beside what the older tables predicted (King, BEA). About forty planetary conjunctions are described. One, of Venus and Mercury on the evening of 19 May 1000, he recorded with Mercury a third of a degree north of Venus, which King notes modern computation confirms. Of the thirty eclipses he reports, some were used in the 19th century by the astronomer Simon Newcomb in his study of the Moon’s motion (King, DSB).
The spherical astronomy in the handbook runs to several hundred formulas stated in words, and King judges it highly sophisticated. He singles out a solution for the time between two sightings of the sun that uses the cosine rule for plane triangles, the earliest attested use of that rule (King, DSB).
The observatory he probably did not have
Popular accounts often say that Ibn Yunus worked in a well equipped observatory in Cairo. King calls that claim remarkable, given how little the sources say. Ibn Yunus describes almost none of his instruments: an instrument provided by the caliphs, probably a large meridian ring, plus an astrolabe and a gnomon. The places he names for his observations are a mosque in al-Qarafa and his great-grandfather’s house in Fustat; he once observed Venus from a house of al-Hakim’s overlooking Cairo. Al-Hakim’s attempt to build an observatory came after Ibn Yunus died (King, DSB). King credits the historian A. Sayili with showing how the observatory idea entered Western books (King, BEA).
The idea survives. A 2026 preprint on the eclipse of 997 still refers, in passing, to “the Cairo observatory associated with Ibn Yunus” (Bakhromzod, arXiv). On the evidence King sets out, the safer statement is that he observed from a mosque and from private houses with a few instruments.
A second legend says he timed things with a pendulum. The MacTutor biography finds no evidence for it, and reports King’s tracing of the story to Edward Bernard in 1684 (O’Connor and Robertson).
The Very Useful Tables
The tables that made his name in daily life were not in the Hakimi handbook. King describes a corpus of tables for timekeeping by the sun, later given the title Kitab ghayat al-intifa, the Very Useful Tables, which was used in Cairo until the 19th century (King, DSB). In full it runs to about 200 pages, most tables holding 180 entries, all computed for a latitude of 30;0 degrees for Cairo and an obliquity of the ecliptic, the tilt of the sun’s yearly path, of 23;35 degrees.
The main tables give three things for every degree of the sun’s altitude and every degree of its longitude, its place in the zodiac: the time since sunrise, the time remaining until midday, and the sun’s direction. Each of those three sets holds more than ten thousand entries (King, BEA). A timekeeper measured the sun’s altitude with an astrolabe or quadrant, knew the sun’s longitude for the date, and read the time from the page.
The worked example below recomputes a few entries of that kind for the corpus’s own latitude and obliquity. At the equinox, with the sun 30 degrees high in the morning, the time since sunrise is 35;16 degrees of the equator, 2h 21m; at the summer solstice it is 36;48, 2h 27m, and at the winter solstice 47;17, 3h 09m (calculated).
Time since sunrise at Cairo, by the sun's altitude calculated
| Altitude | Summer solsticeSun entering Cancer | Spring equinoxSun entering Aries | Winter solsticeSun entering Capricorn |
|---|---|---|---|
| 10° | 12;420h 51m | 11;340h 46m | 13;290h 54m |
| 20° | 24;541h 40m | 23;161h 33m | 28;291h 54m |
| 30° | 36;482h 27m | 35;162h 21m | 47;173h 09m |
| 40° | 48;303h 14m | 47;553h 12m | above the noon sun |
| 50° | 60;054h 00m | 62;124h 09m | above the noon sun |
| 60° | 71;394h 47m | 90;006h 00m | above the noon sun |
| 70° | 83;205h 33m | above the noon sun | above the noon sun |
| 80° | 96;006h 24m | above the noon sun | above the noon sun |
| Noon | 104;366h 58m at 83.6° | 90;006h 00m at 60.0° | 75;245h 02m at 36.4° |
| Morning twilight at 19° | 26;521h 47m | 22;051h 28m | 23;421h 35m |
| Evening twilight at 17° | 23;451h 35m | 19;441h 19m | 21;171h 25m |
Degrees and minutes of the equator, written as the medieval tables write them (35;16 is 35 degrees 16 minutes); 15 degrees make one hour. The twilight rows give the time from daybreak to sunrise with the sun 19 degrees below the horizon at daybreak, and from sunset to nightfall with it 17 degrees below, the two angles King reports for the corpus's main twilight tables. Latitude 30 degrees.
Tables for the times of prayer
Other tables in the corpus serve the times of prayer. King lists, among functions tabulated for each degree of the sun’s longitude, the length of morning and evening twilight, the time from nightfall to daybreak, the time from sunrise to midday, and the intervals from midday to the beginning of the afternoon prayer and from then to sunset (King, DSB).
The twilight angles show the work changing hands. In the Hakimi handbook Ibn Yunus suggests a depression of the sun of 18 degrees, or alternatively 20 for morning and 16 for evening; the main twilight tables of the corpus use 19 and 17. The corpus also corrects the length of daylight for refraction at the horizon, apparently assuming the true horizon lies about two thirds of a degree below the visible one; King calls these corrections, which are attributed to Ibn Yunus, the earliest known numerical estimate of refraction’s effect on rising and setting. A further table gives the altitude of the sun when it stands in the direction of Makkah, used to find the qibla and to orient the mihrab of a mosque (King, DSB).
King adds that virtually all later Egyptian prayer tables until the 19th century were based on this corpus, sometimes disguised, with the entries written out in words for each day of the Coptic year.
Did Ibn Yunus compute them?
Here the record is honest about its limits. King writes that it is difficult to say how many of the corpus’s tables Ibn Yunus actually computed; some appear to be the work of al-Maqsi, a Cairo astronomer of the late 13th century (King, DSB), and his later encyclopedia entry says some were added in the 13th and 14th centuries (King, BEA). In a 1990 survey King put the weight on that later period, writing that new tables compiled in 13th century Cairo set the tone for astronomical timekeeping across the Islamic world, and that the 200 or so pages of Cairo tables were only discovered in 1970 (King, Science in the Service of Religion). The fairest summary is a corpus that grew around a core associated with Ibn Yunus, whose borders are not yet fixed.
Cairo’s tables travel
The tables inspired work elsewhere, in 13th century Yemen and 14th century Syria. In Damascus the timekeeper al-Khalili recomputed the first two sets for Damascus with Ibn al-Shatir’s values, 33;30 degrees for the latitude and 23;31 for the obliquity. Those Damascus tables were used until the 19th century; one of the last timekeepers to use them, who died in 1889, converted their entries from degrees into hours and minutes (King, Al-Khalili).
The man in anecdote
A contemporary, the historian al-Musabbihi, left a sketch that later writers preserved. In King’s summary of it, Ibn Yunus was careless, absent minded and shabbily dressed. One day, in good health, he predicted his own death in seven days, settled his affairs, locked himself in his house, washed the ink from his manuscripts and recited the Quran until he died on the day he had named. His son, the same source says, sold his papers by the pound in the soap market (King, DSB). These are anecdotes from one biographer, reported as such.
The tables outlived the stories. The times on this site’s Cairo page come from the same quantities the Very Useful Tables handled, the sun’s altitude, its place on its yearly path and the latitude, worked out in code rather than read from a book.
Sources
Each source below is listed with the date it was read. Links in the text go to the page that supports the sentence. Figures marked calculated are worked out by this site's own code each time the site is built, from the rules the sources give.
- David A. King, "Ibn Yunus", in Thomas Hockey et al. (eds.), The Biographical Encyclopedia of Astronomers (Springer, 2007), pp. 573 to 574. Online at McGill University's Institute of Islamic Studies Read 3 December 2026.
- David A. King, "Ibn Yunus", Complete Dictionary of Scientific Biography (Charles Scribner's Sons, 2008; first published 1976), text hosted by MacTutor, University of St Andrews Read 3 December 2026.
- J. J. O'Connor and E. F. Robertson, "Abu'l-Hasan Ali ibn Abd al-Rahman ibn Yunus", MacTutor History of Mathematics, University of St Andrews, 1999 Read 3 December 2026.
- David A. King, "Al-Khalili", Complete Dictionary of Scientific Biography (Charles Scribner's Sons, 2008), text hosted by MacTutor, University of St Andrews Read 3 December 2026.
- David A. King, "Science in the Service of Religion: The Case of Islam", Impact of Science on Society 40 no. 3 (UNESCO, 1990), pp. 245 to 262; extract republished with the author's permission by Muslim Heritage, 2021 Read 3 December 2026.
- Rizoi Bakhromzod, "Determination of the longitude difference between Baghdad and Khwarezm using a lunar eclipse", arXiv preprint 2601.15837 (January 2026), not peer reviewed Read 3 December 2026.
This article is history, drawn from the academic and historical record and published by the makers of Prayer Times & Quran Plus. It is not religious guidance, and it does not rule between schools or traditions. Corrections are welcome at support.