Tupper self referential formula

From PyPedia
Jump to: navigation, search

Contents

[edit] Documentation

Plots the Tupper's_self-referential_formula:

{1\over 2} < \left\lfloor \mathrm{mod}\left(\left\lfloor {y \over 17} \right\rfloor 2^{-17 \lfloor x \rfloor - \mathrm{mod}(\lfloor y\rfloor, 17)},2\right)\right\rfloor

The plot is the very same formula that generates the plot.

[edit] Parameters

<inputs>
</inputs>


[edit] Return

None

[edit] See also

[edit] Code

def Tupper_self_referential_formula():

	k = 4858450636189713423582095962494202044581400587983244549483093085061934704708809928450644769865524364849997247024915119110411605739177407856919754326571855442057210445735883681829823754139634338225199452191651284348332905131193199953502413758765239264874613394906870130562295813219481113685339535565290850023875092856892694555974281546386510730049106723058933586052544096664351265349363643957125565695936815184334857605266940161251266951421550539554519153785457525756590740540157929001765967965480064427829131488548259914721248506352686630476300

	def f(x,y):
		d = ((-17 * x) - (y % 17))
		e = reduce(lambda x,y: x*y, [2 for x in range(-d)]) if d else 1
		f = ((y / 17) / e)
		g = f % 2
		return 0.5 < g

	for y in range(k+16, k-1, -1):
		line = ""
		for x in range(0, 107):
			if f(x,y):
				line += "@"
			else:
				line += " "
		print line

[edit] Unit Tests

def uni1():
	return True

[edit] Development Code

def Tupper_self_referential_formula():
	pass

[edit] Permissions

[edit] Documentation Permissions

Kantale

[edit] Code Permissions

Kantale

[edit] Unit Tests Permissions

Kantale

[edit] Permissions Permissions

Kantale

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox