User Profile

Collapse

Profile Sidebar

Collapse
pyask
pyask
Last Activity: Oct 3 '11, 11:26 AM
Joined: Sep 3 '11
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Hi I want to calculate the distribution of continued fraction expansion (of N up to 10000). I think I need to choose a random variable x and calculate its cfe for n = 15, then store the counts in a dictionary. Then, choose another random variable x and continue the calculation until the size of the dictionary reaches 10000.

    But I just can't let my program understand this idea.
    See more | Go to post

    Leave a comment:


  • to calculate the universal distribution of continued fraction expansion

    Hi all,

    I'm studying python program in uni.
    my lecture asks us to calculate the universal distribution of continued fraction expansion

    But I always have an error says: TypeError: 'builtin_functi on_or_method' object is not subscriptable.
    here's my algorithm:

    Code:
    def universal_distro(N=10000):
            import random
    	x = random.random()
    	g = list()
    	m = dict()
    	o = dict()
    ...
    See more | Go to post
    Last edited by Stewart Ross; Sep 3 '11, 08:40 AM. Reason: Code tagged
No activity results to display
Show More
Working...