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"

FillChar(wavehdr, sizeof(wavehdr),0);
  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
    else if(IsNan(wavedata[0].Data[(i*2)]))  then begin

    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);

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)