FromContinuedFraction
The value of a continued fraction given its list of terms .
✓ checked against that system · ! checked, with disagreements (hover a chip)Wolfram Language
FromContinuedFraction!FromContinuedFraction(terms)For a flat list of integers/symbols with at least one symbol, builds the nested unsimplified form term by term rather than compute-engine's combined single ratio.SageMath
continued_fraction(terms).value()SymPycontinued_fraction_reduce(terms)Typed signatures
| Type | Package | Applies |
|---|---|---|
(collection<any>) -> number | analyticreplaces compute-engine | always |
(collection<any>) -> number | compute-engine | always |
(collection<any>) -> number | modularreplaces analytic | always |
Details
- Takes the list of terms , or for a periodic tail, as Wolfram's does; ContinuedFraction is its inverse.
- The empty list stays unevaluated, where Wolfram answers
Infinity.
Examples
Scope #
Properties #
About
| Examples | 7 |
|---|---|
| Checked against | Wolfram Language 6 agree1 differSageMath 4 agree3 errorSymPy 6 agree1 unevaluated |
| Crosswalk | Wolfram LanguageSageMathSymPy |
Implementation
mapped
sympypackages/oracle/src/mappings.tsA periodic tail [a0, [period]] is SymPy's own nested-list form. The empty list is 0 there, where ours stays unevaluated and Wolfram answers Infinity.
mapped
sagepackages/oracle/src/mappings.ts See also: ContinuedFraction