Advertisement
Guest User

Untitled

a guest
Jan 16th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. import numpy as np
  2.  
  3. aggregate_product = np.log(1)
  4. iterations = 0
  5.  
  6. while aggregate_product != float('-inf'):
  7. aggregate_product += np.log(0.5)
  8. iterations += 1
  9.  
  10. # break program execution and then print out
  11. print(iterations)
  12. print(aggregate_product)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement