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

  • Re: computing Bernoulli numbers
    ... the calling routine. ... I'm afraid I don't understand what you mean with your response. ... res = 1.0_qp ...
    (comp.lang.fortran)
  • Re: TFT monitor Best 22"?
    ... The response is good at 2ms so no problem there. ... I would be jumping from my present 19" crt which I've lived with ok at 1024x768 res for the past six years to a 22" which is frankly big enough for me. ...
    (uk.comp.homebuilt)