Re: computing Bernoulli numbers



Bart Vandewoestyne wrote:
On 2008-01-31, Michel Olagnon <molagnon@xxxxxxxxxxxxxxxxx> wrote:
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

bernoulli_series is a subroutine from my module mod_bernoulli.
In mod_bernoulli, I USE mod_utilities and in mod_utilities
real_factorial(n) is defined as I have previously copy-pasted it
in my message.

For as far as I know, due to the use of modules, i don't have to
declare real_factorial's interface explicitely anywhwere in
mod_bernoulli, right?

Does that give you the information you need?

Sorta', but seeing is better than describing -- you're looking for a detail but only presenting parts of the puzzle...more than likely the problem is in what you haven't shown.

....

Looking at the numbers I get and how they differ from what I
must expect, it looks like i'm switching from double precision
to single precision somewhere, but I do not see where that
happens in my code :-(

Perhaps it's a figment of where it is you make the comparison/output, not where it's being calculated? Again, what you've posted isn't the whole thing. I didn't see anything obvious, either, but I'd think you could post a complete working example in not much more than you've already posted.

--
.