Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2000

[Date Index] [Thread Index] [Author Index]

Search the Archive

Alternative cf format.

  • To: mathgroup at
  • Subject: [mg21514] Alternative cf format.
  • From: "Alan W.Hopper" <awhopper at>
  • Date: Fri, 14 Jan 2000 02:43:32 -0500 (EST)
  • Sender: owner-wri-mathgroup at

Dear Math group,

A message I meant to go to mathworld at  i.e. Eric Weisstein's
encyclopedia project at Wolfram , was
inadvertantly as [mg21478] , I apologize for this, but if anyone has
comments to make about that CyclicDecimals notebook  of mine, I would be

interested to know about it.

But here is a separate little question for the mathgroup.

with Mathematica 3.0 ;

In[1]:=  <<NumberTheory`ContinuedFractions`

In[2]:=  cf = ContinuedFraction[87 / 37]

Out[2]:=     2 + ---------
                         2 + -------
                                 1 + -------
                                         5 + -------

In[3]:=  Normal[cf]

Out[3]=  87 / 33

Or has Mathematica 4 gone back to the old list format of Mathematica 2,
(much more convenient for long periods),

as ;

In[4]:=  List @@ cf

Out[4]=  {{2,2,1,5,2}}

Now an alternative way of representing continued fractions is with the
nested form ;

In[5]:=  2+1/(2+1/(1+1/(5+1/2)))

Out[5]=  87 / 33

My HP-48SX calculator can convert from the 'standard' to the nested
formats (for short cont. frs) at the press of a key, and I imagine it
be straightforward to compose some Mathematica code, for the same
Does anyone know a way to convert from the standard to the nested form,
via the list form ?

Best wishes to all for the new year/decade/millenium ,

Alan W. Hopper

Katoomba, Australia.

awhopper at

  • Prev by Date: Re: odd behaviour in rule delayed
  • Next by Date: RE: "mma" becomes "Mathematica"
  • Previous by thread: RE: "mma" becomes "Mathematica"
  • Next by thread: Re: Alternative cf format.