Skip to content

Instantly share code, notes, and snippets.

@sampottinger
Created November 21, 2012 01:11
Show Gist options
  • Save sampottinger/4122419 to your computer and use it in GitHub Desktop.
Save sampottinger/4122419 to your computer and use it in GitHub Desktop.
Mysterious function...
import math
def F4(n):
if n == 0.0:
return 1.0
else:
part = (0.5 * (F4(n - 1.0)))**2.0
return math.sqrt(part + (1.0 - math.sqrt(1.0 - part))**2.0)
n = float(raw_input("Type in your value: ")) # Here's where I'm inputting the value
print "You put in %f." % n
print "The answer is %f." % F4(n)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment