Re: computing Bernoulli numbers
- From: Michel Olagnon <molagnon@xxxxxxxxxxxxxxxxx>
- Date: Thu, 31 Jan 2008 17:19:25 +0100
Bart Vandewoestyne wrote:
On 2008-01-31, Michel Olagnon <molagnon@xxxxxxxxxxxxxxxxx> wrote:
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 :-(
OK, found it:
do
term = 1.0_qp/(i**n)
****
term = (1.0_qp/i)**n
otherwise i**n overflows, and gives a negative value.
.
- References:
- computing Bernoulli numbers
- From: Bart Vandewoestyne
- Re: computing Bernoulli numbers
- From: Michel Olagnon
- Re: computing Bernoulli numbers
- From: Bart Vandewoestyne
- Re: computing Bernoulli numbers
- From: Michel Olagnon
- Re: computing Bernoulli numbers
- From: Bart Vandewoestyne
- computing Bernoulli numbers
- Prev by Date: Re: computing Bernoulli numbers
- Next by Date: Re: The concept of a record
- Previous by thread: Re: computing Bernoulli numbers
- Next by thread: Re: computing Bernoulli numbers
- Index(es):
Relevant Pages
|