astronomer Habash al-Hasib al-Marwazi's idea of tangents to develop equations for calculating and compiling tables of both tangents and cotangents. He discovered their reciprocal functions, the secant and cosecant, and produced the first table of cosecants for each degree from 1° to 90°, which he referred to as a "table of shadows", in reference to the shadow produced on a sundial. Using these trigonometrical relationships, al-Battānī created an equation for finding the , which Muslims face in each of the five prayers they practice every day. The equation he created did not give accurate directions, as it did not take into account the fact that Earth is a sphere. The relationship he used was precise enough only for a person located in (or close to) Mecca, but was still a widely used method at the time. Al-Battānī's equation for , the angle of the direction of a place towards Mecca is given by: where is the difference between the longitude of the place and Mecca, and is the difference between the latitude of the place and Mecca. Al-Battānī's equation was superseded a century after it was first used, when the polymath al-Biruni summarized several other methods to produce results that were more accurate than those that could be obtained using al-Battānī's equation. A small work on trigonometry, ("Summary of the principles for establishing sines") is known. Once attributed to the Iranian astronomer Kushyar Gilani by the German orientalist Carl Brockelmann, it is a fragment of al‐Battānī's . The manuscript is extant in Istanbul as MS Carullah 1499/3. The authenticity of this work has been questioned, as scholars believe al-Battānī would have not have included for "sines" in the title. Works Al-Battānī's ( or , "Book of Astronomical Tables"), written in around 900, and also known as the (), is the earliest extant made in the Ptolemaic tradition that is hardly influenced by Hindu or Sasanian–Iranian astronomy. It corrected mistakes made by Ptolemy and described instruments such as horizontal and vertical sundials, the triquetrum, the mural instrument, and a quadrant instrument. Ibn al‐Nadim wrote that al-Battānī's existed in two different editions, "the second being better than the first". In the west, the work was sometimes called the Sabean Tables. The work, consisting of 57 chapters and additional tables, is extant (in the manuscript árabe 908, held in El Escorial), copied in Al-Andalus during the 12th or 13th century. Incomplete copies exist