跳转到主要内容
Calcton

Continued Fractions Calculator

Free online continued fractions calculator. Enter your values and get instant results with the formula, step-by-step working, a worked example and FAQs — everything runs locally in your browser on Calcton, no signup required.

中文版:连分数在线计算器

Continued Fractions Calculator
分子 p
分母 q(≠ 0)

原理:任何实数都能写成简单连分数 [a₀; a₁, a₂, …],其中 a₀ 是整数部分、后续项为正整数。有理数的展开有限(欧几里得辗转相除的商序列),无理数的展开无限且唯一。黄金比例是「最无理」的数——它的展开全部是 1:[1; 1, 1, 1, …];√2 的展开周期性全 2:[1; 2, 2, 2, …];π 的开头是 [3; 7, 15, 1, 292, …]。收敛子 hₖ/kₖ 给出同分母长度下的最佳有理逼近。

步骤:分数模式输入 p、q,走 BigInt 辗转相除给出精确展开;小数模式按精度 10⁻¹¹ 自动截断。输出全部部分商与末 4 个收敛子的分数与十进制值。

示例:355/113 = [3; 7; 16];415/93 = [4; 2; 6; 7];π 的前 4 项 = [3; 7; 15; 1];√2 的第 5 个收敛子 41/29 ≈ 1.413793103448。

注意事项:355/113 作为独立分数的规范展开是 [3; 7, 16],而 [3; 7, 15, 1] 是把末项 16 拆开后的等价写法(末项为 1 的表示不唯一);小数模式受浮点精度限制,超过约 15 位有效数字的部分商不可信;收敛子交错地大于/小于真值(偶项偏大、奇项偏小);连分数在历法设计、齿轮比与公钥密码(RSA 与连分数攻击)中都有直接应用。

相关:黄金比例工具解释全 1 展开与最无理性;佩尔方程工具用 √d 的周期连分数求 x² − d·y² = 1 的解;小数转分数工具是同一欧几里得内核的十进制版本;斐波那契工具的相邻项之比正是黄金比例收敛子序列。

How to use the Continued Fractions Calculator

  1. Fill in the inputs with your own numbers — every field shows what it expects.
  2. The result updates instantly as you type; no "Calculate" click needed.
  3. Read the result card for the main figure, the step-by-step formula, and practical notes.

Frequently asked questions

Is the Continued Fractions Calculator free?

Yes — all math calculators on Calcton are free, with no sign-up required. Your inputs are processed in your browser and never sent to a server.

Is there a Chinese version of this tool?

Yes. Use the Chinese version link above — it is the same calculator with the interface in Simplified Chinese.

References

Formulas and benchmarks used by this calculator follow these published sources.

  1. dlmf.nist.gov
  2. mathworld.wolfram.com
Kevin's profile

KevinContent LeadCalcton Editorial Team · Last updated 2026-10-02

Kevin maintains Calcton's formula verification and content: every calculator cites the standard it implements, worked examples are recomputed programmatically, and health benchmarks follow WHO and international guidelines.

Related calculators

More in this category: Math calculators

About math calculators

Free online math calculators for algebra, statistics, number theory and everyday arithmetic — from quadratic equations and matrices to percentages, fractions and prime factorization, each with step-by-step formulas.

搜索计算器

搜索全站计算器、分类与页面,回车直达