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.

The method says: Set the hypotenuse 弦 (Xian): the diagonal side of a right triangle at 405 feet and multiply it by itself To "multiply by itself" is to square the number. to get 2,025. Within this value is contained the square of the base and the square of the height. Separately, take the height 股 (Gu): the longer vertical leg of a right triangle and multiply it by itself to get 1,296 feet. Subtract these two numbers; the remainder is 729, which is the square of the base. Resolve this using the method for extracting the square root 開平方法 (Kai ping fang fa). The first quotient 初商 (Chu shang): the first digit of the root is 20; place this on the left side. Also place 20 on the right as the fixed divisor 方法 (Fang fa): the initial divisor used in the extraction process. Align the 2 on the left with the 2 on the right and call out "two times two"; subtract 400 from the dividend. The remaining dividend is 329 feet. Then, take the lower first quotient of 20 and double it to make 40; this is the side-term divisor 廉法 (Lian fa): a divisor used in the second stage of root extraction. The second quotient 次商 (Ci shang): the second digit of the root is 7 feet, placed on the left after the first quotient of 20; also place 7 feet on the right after the side-term divisor of 40 to serve as the corner divisor 隅法 (Yu fa): the final adjustment term in the extraction process. Align the 7 on the left with the 4 on the right and call out "four times seven"; subtract 280 from the dividend. Finally, align the 7 on the left with the 7 on the right and call out "seven times seven"; subtract 49 from the dividend. This completes the calculation exactly. The resulting base width 勾 (Gou): the shorter horizontal leg of a right triangle is 27 feet, which matches the requirements of the problem.
The method for a square inscribed in a right triangle 勾股容方 (Gougu rong fang) is the very best:
Multiply the base [Gou] by the height [Gu] to find the area-equivalent;
Sum the base and height together to serve as your divisor [Fa];
Divide the product by this divisor to easily find the side of the square.