Re: computing Bernoulli numbers



Bart Vandewoestyne wrote:
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?

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

or even
external, real(kind=qp) :: real_factorial


in bernoulli_series

Michel

.



Relevant Pages