Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

算例:增乘開平方術 #550

Merged
merged 8 commits into from
Jan 17, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions examples/zh_sqrt.wy
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
吾嘗觀『算經』之書。方悟「取底除」之義。

吾有一術。名之曰「增乘開平方」。欲行是術。必先得一數。曰「實」。乃行是術曰。
注曰。『增乘開平方法,以商數乘下法遞增求之。』。
吾有四數。名之曰「果」曰「商」曰「餘」曰「廉」。有數一。名之曰「法」。
恆為是。施「取底除」於「實」於「法」。若其之『商』小於百者乃止也。
乘「法」以百。昔之「法」者。今其是矣云云。
恆為是。若「法」不大於零者乃止也。
乘「果」以十。昔之「果」者。今其是矣。
加「廉」以「商」。乘其以十。昔之「廉」者。今其是矣。
施「取底除」於「實」於「法」。名之曰「甲」。
昔之「實」者。今「甲」之『商』是矣。
昔之「餘」者。今「甲」之『餘』是矣。
昔之「商」者。今零是矣。
恆為是。加「廉」以「商」。乘其以「商」。若其不小於「實」者乃止也。
加「商」以一。昔之「商」者。今其是矣云云。
加「廉」以「商」。乘其以「商」。若其大於「實」者。
減「商」以一。昔之「商」者。今其是矣云云。
加「廉」以「商」。昔之「廉」者。今其是矣。
加「果」以「商」。昔之「果」者。今其是矣。
乘「商」以「廉」。減「實」以其。乘其以「法」。加其以「餘」。昔之「實」者。今其是矣。
施「取底除」於「法」於百。昔之「法」者。今其之『商』是矣云云。
注曰。『商第一位。上商得數以乘下法為乘方。命上商除實。上商得數以乘下法入乘方。一退為廉,下法再退。』。
注曰。『商第二位。商得數以乘下法為隅。命上商除實訖。以上商乘下法入隅,皆名曰廉。一退,下法再退,以求第三位商。』。
注曰。『商第三位。用法如第二位求之。』。
乃得 「果」。
是謂「增乘開平方」之術也。

噫。施「增乘開平方」於七萬一千八百二十四。書之。
注曰。『楊輝算草』。