logint performance

"Ruud H.G. van Tol" <[email protected]>
Newsgroups gmane.comp.mathematics.pari.devel
Message-ID <[email protected]>
A071521_1(n)=my(t=1/3); sum(k=0, logint(n, 3), t*=3; logint(n/t, 2)+1)

A071521_2(n)=my(t=1/3); sum(k=0, logint(n, 3), t*=3; logint(n\t, 2)+1)


? A071521_1(10^600)
cpu time = 14 ms, real time = 14 ms.
%1733 = 1254865

? A071521_2(10^600)
cpu time = 3 ms, real time = 3 ms.
%1734 = 1254865


That appears to need some some assertive kind of integer casting.
Is that feasible?

-- Ruud
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.