Historically, the earliest method by which trigonometric tables were computed, and probably the most common until the advent of computers, was to repeatedly apply the half-angle and angle-addition trigonometric identities starting from a known value (such as sin(π/2) = 1, cos(π/2) = 0). This method was used by the ancient astronomer Ptolemy, who derived them in the "Almagest", a treatise on astronomy. In modern form, the identities he derived are stated as follows (with signs determined by the quadrant in which "x" lies):