s1="""
0.00000 0.00000 1.00000
0.31416 0.30902 0.95106
0.62832 0.58779 0.80902
0.94248 0.80902 0.58779
1.25664 0.95106 0.30902
1.57080 1.00000 0.00000
1.88496 0.95106 -0.30902
2.19911 0.80902 -0.58779
2.51327 0.58779 -0.80902
2.82743 0.30902 -0.95106
3.14159 0.00000 -1.00000"""
s2=s1.replace('\n',' ')
s3=s2.split(' ')
s4=[]
for i in s3:
if(len(i) < 1): continue
s4.append(i)
print ('s4=',s4)
NL=len(s4)
Nx=int(NL/3)
x=[]; sinx=[]; cosx=[]
for i in range(0,NL,3):
x.append(float(s4[i]))
sinx.append(float(s4[i+1]))
cosx.append(float(s4[i+2]))
sum1=0.; sum2=0.
for i in range(Nx):
sum1+=sinx[i]
sum2+=cosx[i]
print ('%10.5f'*5 %(x[i],sinx[i],cosx[i],sum1,sum2))
print ('sum1=',sum1,' sum2=',sum2)
s4= ['0.00000', '0.00000', '1.00000', '0.31416', '0.
30902', '0.95106', '0.62832', '0.58779', '0.80902',
'0.94248', '0.80902', '0.58779', '1.25664', '0.95106
', '0.30902', '1.57080', '1.00000', '0.00000', '1.88
496', '0.95106', '-0.30902', '2.19911', '0.80902', '
-0.58779', '2.51327', '0.58779', '-0.80902', '2.8274
3', '0.30902', '-0.95106', '3.14159', '0.00000', '-1
.00000']
0.00000 0.00000 1.00000 0.00000 1.00000
0.31416 0.30902 0.95106 0.30902 1.95106
0.62832 0.58779 0.80902 0.89681 2.76008
0.94248 0.80902 0.58779 1.70583 3.34787
1.25664 0.95106 0.30902 2.65689 3.65689
1.57080 1.00000 0.00000 3.65689 3.65689
1.88496 0.95106 -0.30902 4.60795 3.34787
2.19911 0.80902 -0.58779 5.41697 2.76008
2.51327 0.58779 -0.80902 6.00476 1.95106
2.82743 0.30902 -0.95106 6.31378 1.00000
3.14159 0.00000 -1.00000 6.31378 0.00000
sum1= 6.313780000000001 sum2= 0.0