//
Mathematics
Search
Try Notion
Mathematics
连分数计算
ContinuedFraction[x,n]
Example
In[1]:= ContinuedFraction[Pi, 20] Out[1]= {3, 7, 15, 1, 292, 1, 1, 1, 2, 1, 3, 1, 14, 2, 1, 1, 2, 2, 2, 2} In[1]:= ContinuedFraction[47/17] Out[1]= {2, 1, 3, 4}
Copy
C++
FromContinuedFraction
FromContinuedFraction[list] 从连分数项列表中构造一个数
Example
In[1]:= ContinuedFraction[47/17] Out[1]= {2, 1, 3, 4} In[2]:= FromContinuedFraction[%] Out[2]= 47/17 In[3]:= 2 + 1/(1 + 1/(3 + 1/4)) Out[3]= 47/17
Copy
C++