(n, K)
return dup_lshift(seq[n], 1, K)
Low-level implementation of fn(n, x)
Low-level implementation of fn(n, x)
Low - level implementation of fn ( n x )
def dup_spherical_bessel_fn(n, K):
    """ Low-level implementation of fn(n, x) """
    seq = [[K.one], [K.one, K.zero]]

    for i in xrange(2, n + 1):
        a = dup_mul_ground(dup_lshift(seq[-1], 1, K), K(2*i - 1), K)
        seq.append(dup_sub(a, seq[-2], K))

    return dup_lshift(seq[n], 1, K)
def dup_spherical_bessel_fn ( n , K ) : seq = [ [ K . one ] , [ K . one , K . zero ] ] for i in xrange ( 2 , n + 1 ) : a = dup_mul_ground ( dup_lshift ( seq [ - 1 ] , 1 , K ) , K ( 2 * i - 1 ) , K ) seq . append ( dup_sub ( a , seq [ - 2 ] , K ) ) return dup_lshift ( seq [ n ] , 1 , K )