Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from math import *
- def f(x):
- return floor(cos(x*fmod(2.49059,0.442822*x))-0.802418+2*x+0.0902119*x*x)
- for x in range(1, 30):
- print x, f(x)
- '''
- This prints:
- 1 2.0
- 2 3.0
- 3 5.0
- 4 7.0
- 5 11.0
- 6 13.0
- 7 17.0
- 8 21.0
- 9 23.0
- 10 29.0
- 11 31.0
- 12 36.0
- 13 41.0
- 14 43.0
- 15 50.0
- 16 53.0
- 17 59.0
- 18 65.0
- 19 68.0
- 20 76.0
- 21 80.0
- 22 86.0
- 23 93.0
- Software used to generate the formula: TuringBot
- '''
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement