[ create a new paste ] login | about

Link: http://codepad.org/kEJuDC95    [ raw code | output | fork ]

Python, pasted on Nov 30:
1
2
3
4
5
6
7
8
9
10
11
12
import math

def radical(a, b, k):
    return (1-((a**2-b**2)/a**2)*(math.sin(3.141592653589793*(2*k-1)/180))**2)**.5

def f(a, b):
  sigma = 0
  for k in range(1,180/4):
    sigma = sigma + radical(a, b, k)
  return 8*a*math.sin(math.pi/180)*sigma

print f(25.,35.)


Output:
1
184.91089913


Create a new paste based on this one


Comments: