Re: computing Bernoulli numbers



On 2008-01-31, Michel Olagnon <molagnon@xxxxxxxxxxxxxxxxx> wrote:

Can't see the interface declaring real_factorial() as (kind=qp) in
the calling routine.

Michel,

I'm afraid I don't understand what you mean with your response.
I did show how real_factorial(n) looks like:

function real_factorial(n) result(res)
integer(kind=i4b), intent(in) :: n
real(kind=qp) :: res

integer(kind=i4b) :: i

res = 1.0_qp
do i = 1,n
res = res*i
end do

end function real_factorial

and I use it like

bn = 2*mysum*real_factorial(n)/((2*pi)**n)

which looks OK to me.

What would you like to know/see more?

Regards,
Bart

--
"Share what you know. Learn what you don't."
.



Relevant Pages