5 ONERRORGOTO500
10 ANGLE1:y=ATN(x/SQRn):z=COSy^2
20 IFn MOD 2=0 THENa=SINy/2:b=.5 ELSEb=.5+y/PI:IFn=1 THENa=0 ELSEa=SINy*COSy/PI
30 y=1:FORi=n-2 TO2 STEP-2:y=1+(i-1)/i*z*y:NEXT
40 p=1-(b+a*y):IFp<0 THENp=0
80 y=p:RETURN
500 IFERR=1 THENCLS:ONERRORGOTO0
510 sr=1:RESUME80