achievements in astronomy was the determination of the solar year as being 365 days, 5 hours, 46 minutes and 24 seconds which is only 2 minutes and 22 seconds off. In mathematics, al-Battānī produced a number of trigonometrical relationships: He also solved the equation sin x = a cos x discovering the formula: He gives other trigonometric formulae for right-angled triangles such as: Al-Battānī used al-Marwazi's idea of tangents ("shadows") to develop equations for calculating tangents and cotangents, compiling tables of them. He also discovered the reciprocal functions of secant and cosecant, and produced the first table of cosecants, which he referred to as a "table of shadows" (in reference to the shadow of a gnomon), for each degree from 1° to 90°. Using these trigonometrical relationships, Al-Battānī created an equation for finding the qibla, which Muslims must 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 Al-Battānī used was fairly precise when a person is in Mecca, or close to Mecca, but resulted in more and more inaccurate results as one gets more distant from Mecca. However, it was still a widely used method at the time. The equation is as follows: Ibn al-Haytham (Alhazen) used experimentation to obtain the results in his Book of Optics (1021), an important development in the history of the scientific method. He combined observations, experiments and rational arguments to support his intromission theory of vision, in which rays of light are emitted from objects rather than from the eyes. He used similar arguments to show that the ancient emission theory of vision supported by Ptolemy and Euclid (in which the eyes emit the rays of light used for seeing), and the ancient intromission theory supported by Aristotle (where objects emit physical particles to the eyes), were both wrong. Al-Zahrawi, regarded by many as the greatest surgeon of the middle ages. His surgical treatise "De chirurgia" is the first illustrated surgical guide ever written. It remained the primary source for surgical procedures and instruments in Europe for the next 500 years. The book helped lay the foundation to establish surgery as a scientific discipline independent from medicine, earning al-Zahrawi his name as one of the founders of this field. Other notable Arabic contributions include among other things: