https://github.com/cran/bild
Tip revision: 6661b7703cf2271cb13756a6ff2969ef8e1d88f3 authored by M. Helena Goncalves on 03 November 2023, 14:40:02 UTC
version 1.2-1
version 1.2-1
Tip revision: 6661b77
mcpj.f
subroutine mcpj(th1,th2,psi1,p)
implicit double precision(a-h,o-z)
dimension p(2)
ps1=psi1-1
C# calculate the probabilities of pj depending on psi1 pj=(p0,p1)
if (dabs(ps1).gt.1.e-10) then
d=dsqrt(1+ps1*(psi1*(th1-th2)**2-(th1+th2)**2+2*(th1+th2)))
p(1)=(d-1+ps1*(th1-th2))/(2*ps1*(1-th2))
p(2)=p(1)+(1-d+ps1*(th1+th2-2*th1*th2))/(2*ps1*th2*(1-th2))
else
p(1)=th1
p(2)=th1
end if
return
end