Re: Tough problem...
- From: Lord Crc <lordcrc@xxxxxxxxxxx>
- Date: Wed, 28 Jun 2006 07:48:59 +0200
On Wed, 28 Jun 2006 05:37:48 +0200, "Atmapuri"
<janez.makovsek@xxxxxxx> wrote:
This situation occurs in FFT, when the length of the FFT goes in to
million of points. The sin and cos functions become inaccurate when
the i in sin(i*arg) goes in to millions.
I'm no expert here, and I dont quite get where the i comes from, but
if it's an loop index, couldn't you do something like this:
var
i: integer;
j: double;
begin
j:= start_value;
for i:= start_value to end_value do
begin
compute sin(j*arg)
j:= j + 1;
if j > TWO_PI then
j:= j - TWO_PI;
end;
end;
Certainly not perfect, but should hold on to more precision than using
sin(i*arg) straight up, i think?
- Asbjørn
.
- Follow-Ups:
- Re: Tough problem...
- From: Avatar Zondertau
- Re: Tough problem...
- References:
- Tough problem...
- From: Atmapuri
- Re: Tough problem...
- From: Eric Grange
- Re: Tough problem...
- From: Atmapuri
- Tough problem...
- Prev by Date: Re: Tough problem...
- Next by Date: Re: Tough problem...
- Previous by thread: Re: Tough problem...
- Next by thread: Re: Tough problem...
- Index(es):
Relevant Pages
|