# ContinuedFraction: different result with different representation of argument

Why if I write:

In[7]:= ContinuedFraction[3.15]

FromContinuedFraction[%]

N[%]


I get:

Out[7]= {3, 6, 1}

Out[8]= 22/7

Out[9]= 3.14286


While if I write:

In[10]:= ContinuedFraction[315/100]

FromContinuedFraction[%]

N[%]


I get the right values:

Out[10]= {3, 6, 1, 2}

Out[11]= 63/20

Out[12]= 3.15


Somebody could help me on understanding?

• Nothing wrong in what you did. That approximated one does appear to be incorrect. Nov 23 '18 at 22:42
• Since this has returned to the front page, so to speak, I will note that I filed a bug report for it. Jan 5 '19 at 16:19