I'm trying to do filtering .wav sample data value using the HAAR formula but got error "floating point overflow" then i do nothing but the error changed to "EAccessViolation at adress 00402771"

Code:
FillChar(wavehdr, sizeof(wavehdr),0);
  Stream.Read(wavehdr,sizeof(wavehdr));
  SetLength(cA1, sizeof(wavehdr));
  SetLength(cD1, sizeof(wavehdr));
  for i:=0 to (numsamples)-1 do begin

    if(IsNan(wavedata[0].Data[(i*2)-1])) then begin
      wavedata[0].Data[(i*2)-1]:=0;
    end
    else if(IsNan(wavedata[0].Data[(i*2)]))  then begin
      wavedata[0].Data[(i*2)]:=0;
    end;

    cA1[i]:=(wavedata[0].Data[(i*2)-1]*0.7071) + (wavedata[0].Data[(i*2)]*0.7071);
    cD1[i]:=(wavedata[0].Data[(i*2)-1]*0.7071) + (wavedata[0].Data[(i*2)]*-0.7071);

  end;
where wavedata[0].Data[i], i get it from function Stream.Read to load sample data value of .wav file. I don't know why i got the error or what the error means and i've been searching the error mostly caused of divizion by zero, but there is no divizion by zero in my code. So maybe i could some help here what is the error mean in my code? cA1 cD1 and wavedata were all array of double. which wavedata array may contain value like : 0, 1.42383914166047E64, 1.39073482014559E-309 etc (it's the value of sample .wav data)