Ahmad ibn 'Abdallah al-Marwazi, known as Habash al-Hasib (, died 869) was a Persian astronomer, geographer, and mathematician from Merv in Khorasan, who discovered the trigonometric ratios tangent, and cotangent. Al-Biruni who cited Habash in his work, expanded his astronomical tables.
Habash al-Hasib flourished in Baghdad, and died a centenarian some time between 864 and 874 possibly in Abbasid Samarra. The title "Habash" (Abbyssian) may refer to dark skin color. He worked under two Abbasid caliphs, al-Ma'mun and al-Mu'tasim.
Habash al-Hasib developed a trigonometric algorithm to solve problems related to parallax, which was later rediscovered by Johannes Kepler in 1609 and it is now known as Kepler's equation.
Habash al-Hasib is the father of the astronomer Abu Ja'far ibn Habash.
Habash Hasib made astronomical observations from 825 to 835, and compiled three zijes (astronomical tables): the first were still in the Hindu manner; the second, called the "tested" tables, were the most important; they are likely identical with the "Ma'munic" or "Arabic" tables and may be a collective work of al-Ma'mun's astronomers; the third, called tables of the Shah, were smaller.
Apropos of the solar eclipse of 829, Habash gives us the first instance of a determination of time by an altitude (in this case, of the sun); a method which was generally adopted by Muslim astronomers.
In 860, he seems to have introduced the notion of "shadow", umbra (versa), equivalent to our tangent in trigonometry, and he compiled a table of such shadows which seems to be the earliest of its kind. He also introduced the cotangent, and produced the first tables of for it.
Habash al-Hasib conducted various observations at the Al-Shammisiyyah observatory in Baghdad and estimated a number of geographic and astronomical values. He compiled his results in The Book of Bodies and Distances (), in which some of his results included the following: