*rronnbunn
randomize cls En=0.0 num=0 : V=0.0 : time=0 : n=0 : nn=0 : porm=0 : snum=rnd(10000) : tnum=0 : en=rnd(10000) ddim E,100 ddim sn,100 *mainloop num=0 repeat 100//100は可変、→∞に randomize sn(num)=rnd(10000) num=num+1 loop num=0 tnum=0 repeat 100//100は可変、→∞に title ""+num randomize tn=tnum S(num)=(sin(((snum+tnum)*M_PI)/180)+1)-(sin(((sn(num)+tn)*M_PI)/180)+1) porm=rnd(1) if porm=0{ S(num)=S(num) } else if porm=1{ S(num)=-S(num) } E(n)=1.0/(absf(S(num))+1) wait 1 cls En=En+E(n) num=num+1 n=n+1 tnum=tnum+1 loop V=En*(sin(((en+time)*M_PI)/180)+1)//ラジアン化必須 mes "Value of the PF:"+V wait 1 cls time=time+1 goto *mainloop