All pastes #740976 Raw Edit

Mine

public python v1 · immutable
·published 2007-10-18 11:28 UTC
rendered paste body
#!/usr/bin/pythondef odd_powers(n):	m = n	while True:		yield m		m = m * n * ndef factorials():	n = 6 #start with 3!	c = 3	while True:		yield n		c = c + 1		n = n * cdef signs():	s = -1	while True:		yield s		s = s * (-1)def sine(x):	p = odd_powers(x)	p.next() 			#skip first power	f = factorials()	s = signs()	while True:		yield x		a = p.next()		b = f.next()		f.next() 		#skip even factorials		c = s.next()		x = x + c * a / bs = sine(3.0)while True:	try:		print str(s.next())	except:		break