[seqfan] Re: insufficient gp/pari precision gives incorrect results

Joerg Arndt arndt at jjj.de
Wed Oct 14 01:42:38 CEST 2009

As explained in private mail
(by G.G., thanks for that):

The seq

 a(n)=component(component(contfracpnqn(contfrac(exp(2/3), n)), 1), 1) 

This will only work up to a certain
term, depending on the precision used.

Also the "component" stuff is bad style,
rather put, something like:

default(realprecision,100); /* large enough */
a(n)=contfracpnqn(contfrac(exp(2/3), n))[2,1]

Using the explicit expressions for the
contfrac would be _much_ nicer than
converting from a real approximation.
contfrac is given as

Same in
and 12 more seqs (all by  Benoit Cloitre)
found by searching for

Don't know whether B.C. is on the list,
he should do the cleanup himself.

cheers,  jj

Searching "component(component"
gives more code that could be much beautified.

* Georgi Guninski <guninski at guninski.com> [Oct 13. 2009 20:23]:
> [...]

More information about the SeqFan mailing list