Python Forum

Full Version: Carlssons method for log
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Anyone have experiance from the Carlssons method for log?
I have this code but it doesnt seem to work.
def fast_approx_ln(x,n):
    d = empty([n+1,n+1])
    a0 = (1+x)/2
    g0 = sqrt(x)
    for i in range(n):
        a0 = (a0+g0)/2
        g0 = sqrt(a0*g0)
        a0 = d[0,i]
    for k in range(n):
     for i in range(n):
           d[k,i] = (d[k-1,i]-4**(-k)*d[k-1,i-1])/(1-4**(-k))
     return((x-1)/d[n,n])
#print(fast_approx_ln(3,2))
Can you provide a link? I can't find anything about Carlssons method
perhaps something here: https://pypi.org/search/?q=Carlssons
I haven't scanned the list, but you can open the links and search for carlssons.
I did look at diagram2vec and it has a section on Adcock-Carlsson polynomials if that's what your looking for.