pyoculus 0.1.1
|
Functions | |
expandcf (irrational, n, thres_ai=1000) | |
Expand an (positive) irrational using the continued fraction expansion. | |
fromcf (ai) | |
Obtain the fraction pp/qq of the continued fraction ai. | |
pyoculus.irrationals.continued_fraction.expandcf | ( | irrational, | |
n, | |||
thres_ai = 1000 ) |
Expand an (positive) irrational using the continued fraction expansion.
irrational | – the positive irrational number to expand. an absolute will be taken if negative |
n | – the number of terms |
thres_ai=1000 | – terminate the expansion if some ai>thres_ai |
an | integer sequence contains the continued fraction expansion of irrational up to the nth term |
pyoculus.irrationals.continued_fraction.fromcf | ( | ai | ) |
Obtain the fraction pp/qq of the continued fraction ai.
ai | an integer array contains ai for the continued fraction expansion |