program Save parameter (rad2deg=57.29577951,deg2rad=.017453292) print *,' Zt,At,Zp,Ap,Teta_max?>' read(*,*) Zt,At,Zp,Ap,Teta dmin=1.25*(At**(1./3.)+Ap**(1./3.))+5. if (Teta.eq.0.) then Emax=1.44*Zp*Zt/dmin*(Ap+At)/At print *,'dmin=',dmin,' Emax=',Emax else if (Ap/At*sin(Teta*deg2rad).gt.1) stop ('Too big theta') Emax=.72*Zp*Zt/dmin*(Ap+At)/At* & (1+1/sin(TetaCm(Teta,Ap,At,1)/2.)) print *,'dmin=',dmin,' TetaCM=',TetaCm(Teta,Ap,At,1)*rad2deg, & ' Emax=',.72*Zp*Zt/dmin*(Ap+At)/At* & (1+1/sin(TetaCm(Teta,Ap,At,1)/2.)) if (Ap.gt.At) print *,'dmin=',dmin, & ' TetaCM=',TetaCm(Teta,Ap,At,2)*rad2deg, & ' Emax=',.72*Zp*Zt/dmin*(Ap+At)/At* & (1+1/sin(TetaCm(Teta,Ap,At,2)/2.)) endif end function TetaCm(teta,ap,at,is) parameter (deg2rad=.017453292) t=teta*deg2rad if (is.eq.1) TetaCm=asin(ap/at*sin(t))+t if (is.eq.2) TetaCm=3.141592654-asin(ap/at*sin(t))+t return end