Pi from Viète’s Product
Approximate π by 2∏(j=1…m)2/a_j with a₁=√2 and a_(j+1)=√(2+a_j), including the empty product two and a 10,000-term resource limit.
Description
Viète’s product approximates π using nested square roots.
Viète’s product approximates π using nested square roots. Each successive radical approaches two, making later multipliers approach one.1
The tool returns value. The indexing and output conventions below determine how to read these values.
When to use Pi from Viète’s Product
Use this for the following task: Approximate π by 2∏(j=1…m)2/a_j with a₁=√2 and a_(j+1)=√(2+a_j), including the empty product two and a 10,000-term resource limit. Use the input and output conventions below to reproduce the intended mathematical quantity.
How to use Pi from Viète’s Product and understand its results
- Choose the required indexes, integers or sequence entries. Preserve decimal-string encodings where the field table specifies strings.
- Enter terms according to the field table, then run the tool.
- Read value. Use the stated units, indexing and interpretation of the numerical result.
- Keep exact decimal strings for subsequent integer arithmetic; distinguish them from any explicitly approximate numeric result.
| Input field | Meaning | Value type and bounds | Requirement |
|---|---|---|---|
| terms | Nested radical term count (resource limit 10000) | integer; minimum 0; maximum 10000 | Required |
Initialize radical to zero and value to two. Update the radical and multiplier for each requested term, stopping early when the computed radical rounds to exactly two.
a₁=√2; aⱼ₊₁=√(2+aⱼ); approximation = 2×Π(2/aⱼ) The symbols and boundary conditions refer to the supplied fields and the implementation described above.
| Output field | Meaning | Value type |
|---|---|---|
| value | Viète product approximation | number |
{
"input": {
"terms": 1
},
"output": {
"value": 2.82842712474619
}
} Limitations and assumptions
Zero terms returns two. The maximum is 10000 terms, but floating-point saturation can end work much earlier; additional terms do not guarantee more accurate digits.
Use the declared integer bounds and string formats. Large exact outputs remain decimal strings; numerical approximations use ordinary floating-point arithmetic. A rejected input is different from a valid zero count or false membership flag.
Alternative or Complementary methods
Choose Pi from the Wallis Product when you need its operation: Approximate π by 2∏(k=1…m)4k²/(4k²−1), using the empty product value two when m=0 and a 1,000,000-term resource limit. Choose Arithmetic–Geometric Mean Iterates for the complementary operation: Approximate the arithmetic–geometric mean of two finite nonnegative values with the requested number of iterations, returning both final iterates and limiting work to 128 iterations.
Background reference: A set of the Viète-like recurrence relations for the unity constant.
References
-
A set of the Viète-like recurrence relations for the unity constant — Abrarov and Quine; arXiv
Similar or alternative tools
- Pi from the Wallis Product
Approximate π by 2∏(k=1…m)4k²/(4k²−1), using the empty product value two when m=0 and a 1,000,000-term resource limit.
- Arithmetic–Geometric Mean Iterates
Approximate the arithmetic–geometric mean of two finite nonnegative values with the requested number of iterations, returning both final iterates and limiting work to 128 iterations.