|
[Date Index]
[Thread Index]
[Author Index]
Alternative cf format.
- To: mathgroup at smc.vnet.net
- Subject: [mg21514] Alternative cf format.
- From: "Alan W.Hopper" <awhopper at hermes.net.au>
- Date: Fri, 14 Jan 2000 02:43:32 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
Dear Math group,
A message I meant to go to mathworld at wolfram.com i.e. Eric Weisstein's
encyclopedia project at Wolfram , http://mathworld.wolfram.com was
posted
inadvertantly as [mg21478] , I apologize for this, but if anyone has
some
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]
1
Out[2]:= 2 + ---------
1
2 + -------
1
1 + -------
1
5 + -------
2
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
would
be straightforward to compose some Mathematica code, for the same
purpose.
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 hermes.net.au
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.
|