Thanks ! This is exactly what I meant. Where shoud it be placed,
though ? In the constructor of real numbers or in the CFF
constructor ? I guess I could do it, but I'm just starting developing
for Sage...
Alex

On 28 jan, 14:11, Dan Drake <dr...@kaist.edu> wrote:
> On Thu, 28 Jan 2010 at 04:21AM -0800, ablondin wrote:
> > Hello, everyone,
> > I would like to create a real number from its continued fraction
> > expansion. I know it is possible to call ``CFF([0,1,1,1,1,1,1]).value()
> > `` to have an approximation of the golden ratio, but I would like to
> > pass an iterator as an argument to the function ``CFF(...)`` so that I
> > can get a real number ``x`` represented by its continued fraction
> > expansion. As a consequence, for instance, I could get an arbitrary
> > precision about its digits by calling something like ``x.value(bits=50)
> > ``.
> > Does it already exist in Sage ? Or do I need to create such a
> > function ? Thank you !
>
> I think you'll need to create the function. I'd like to see something
> like that in Sage; it would be nice to create the golden ratio with
>
> def f():
>     yield 0
>     while True:
>         yield 1
>
> CFF(f())
>
> Dan
>
> --
> ---  Dan Drake
> -----  http://mathsci.kaist.ac.kr/~drake
> -------
>
>  signature.asc
> < 1 000AfficherTélécharger

-- 
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to 
sage-support+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to