This library is built in the open.
If you spot an error, have a suggestion, or just want to say hello — we’d love to hear from you.

Suppose there is a circular field with a diameter of 26 paces. A segment is cut from the edge with an area of 128 square paces. We ask: what are the lengths of the chord and the sagitta As noted previously, the "chord" (xian) is the straight line across the segment, and the "sagitta" (shi, literally "arrow") is the height of the arc. of the cut?
The method says: Double the area 256 and square it to get 65,536 paces, which serves as the dividend shi: the constant value in the equation to be solved. Separately, multiply the area by four to get 512 paces, which is the upper coefficient shanglian: a term in the polynomial equation. Also, multiply the diameter by four to get 104 paces, which is the lower coefficient xialian. Use 5 as the leading coefficient fuyu: the coefficient of the highest power.
Set the trial quotient the estimated root of 8 on the top left as the divisor. Multiply it by the upper coefficient to get 4,096. Then multiply the trial quotient 8 by the leading coefficient 5 to get 40. Subtract this from the lower coefficient 104 - 40, leaving a remainder of 64 paces.
Separately, square the trial quotient 8 to get 64. Multiply this by the remaining lower coefficient 64 × 64 to get 4,096. Combine this with the upper coefficient 4,096 + 4,096 to get 8,192, which serves as the divisor xiafa: the final divisor used to find the root. Divide the dividend 65,536 ÷ 8,192 to obtain the paces of the sagitta.
If you are asked to find the chord, the method says: Place the area and double it to get 256. Divide this by the sagitta of 8 to get 32. From this, subtract the sagitta of 8 paces. The remainder is the chord of 24 paces. This matches the question. The formula used for the chord here is $c = (2A / s) - s$, which is derived from the common traditional Chinese approximation of a segment's area: $Area = \frac{s(c+s)}{2}$.