Difference between revisions of "ContinuedFraction Command"
From GeoGebra Manual
(command syntax: changed [ ] into ( )) |
|||
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
− | <noinclude>{{Manual Page|version= | + | <noinclude>{{Manual Page|version=5.0}}</noinclude> {{command|algebra}} |
− | {{command|algebra}} | + | ;ContinuedFraction( <Number> ) |
− | ;ContinuedFraction | ||
:Creates [[w:Continued fraction|continued fraction]] of given number. The result is a LaTeX [[Texts|text object]]. The fraction is computed numerically within precision 10<sup>-8</sup>. | :Creates [[w:Continued fraction|continued fraction]] of given number. The result is a LaTeX [[Texts|text object]]. The fraction is computed numerically within precision 10<sup>-8</sup>. | ||
− | :{{example|1=<div><code>ContinuedFraction | + | :{{example|1=<div><code>ContinuedFraction(5.45)</code> gives '' <math>5 + \frac{1}{ 2+ \frac{1}{4+ \frac{1}{ 1+ \frac{1}{ 1 } } } }</math> ''</div>}} |
− | ;ContinuedFraction | + | ;ContinuedFraction( <Number>, <Level> ) |
:Creates continued fraction of given number. Number of quotients is less than or equal to ''Level'', but never exceeds the number of quotients needed to achieve the precision mentioned above. | :Creates continued fraction of given number. Number of quotients is less than or equal to ''Level'', but never exceeds the number of quotients needed to achieve the precision mentioned above. | ||
− | :{{example|1=<div><code>ContinuedFraction | + | :{{example|1=<div><code>ContinuedFraction(5.45, 3)</code> gives '' <math>5 + \frac{1}{ 2+ \frac{1}{4+ ... } }</math> ''</div>}} |
− | ;ContinuedFraction | + | ;ContinuedFraction( <Number>, <Level>, <Shorthand true|false> ) |
:Meaning of first two arguments is same as above, the argument ''Level'' is optional. When ''Shorthand'' is true, shorter syntax for the result is used: the LaTeX text contains a list of the integer parts of the continued fraction. | :Meaning of first two arguments is same as above, the argument ''Level'' is optional. When ''Shorthand'' is true, shorter syntax for the result is used: the LaTeX text contains a list of the integer parts of the continued fraction. | ||
:{{Examples|1=<br><div> | :{{Examples|1=<br><div> | ||
− | :*<code>ContinuedFraction | + | :*<code>ContinuedFraction(5.45, true)</code> gives [''5; 2, 4, 1, 1''] |
− | :*<code>ContinuedFraction | + | :*<code>ContinuedFraction(5.45, 3, true)</code> gives [''5; 2, 4, ...'']</div>}} |
Latest revision as of 11:01, 3 October 2017
- ContinuedFraction( <Number> )
- Creates continued fraction of given number. The result is a LaTeX text object. The fraction is computed numerically within precision 10-8.
- Example:
ContinuedFraction(5.45)
gives 5 + \frac{1}{ 2+ \frac{1}{4+ \frac{1}{ 1+ \frac{1}{ 1 } } } }
- ContinuedFraction( <Number>, <Level> )
- Creates continued fraction of given number. Number of quotients is less than or equal to Level, but never exceeds the number of quotients needed to achieve the precision mentioned above.
- Example:
ContinuedFraction(5.45, 3)
gives 5 + \frac{1}{ 2+ \frac{1}{4+ ... } }
- ContinuedFraction( <Number>, <Level>, <Shorthand true|false> )
- Meaning of first two arguments is same as above, the argument Level is optional. When Shorthand is true, shorter syntax for the result is used: the LaTeX text contains a list of the integer parts of the continued fraction.
- Examples:
ContinuedFraction(5.45, true)
gives [5; 2, 4, 1, 1]ContinuedFraction(5.45, 3, true)
gives [5; 2, 4, ...]