 To tell the time from the sun's altitude, for instance, repeated applications of Menelaus' theorem were required.For medieval Islamic astronomers, there was an obvious challenge to find a simpler trigonometric method.In the early 9th century AD, Muhammad ibn Mūsā al-Khwārizmī produced accurate sine and cosine tables, and the first table of tangents.