Commit 7592cc50 authored by ulrich_y's avatar ulrich_y

Use real for binom to avoid overflow

parent cd14ec2a
......@@ -121,7 +121,7 @@ CONTAINS
! published under GNU Free Documentation License 1.2
FUNCTION binom(n, r)
integer, intent(in) :: n, r
integer :: binom
real(kind=prec) :: binom
integer(16) :: num, den
integer i, k
......@@ -141,7 +141,7 @@ CONTAINS
end do
end if
end do
binom = int(num/den)
binom = num/den
END FUNCTION binom
! subroutine print(s1,s2,s3,s4,s5)
! character(len = *), intent(in), optional :: s1, s2, s3, s4, s5
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment