ah !  I failed to notice that last5_vals[] is an array of *doubles* - so memset isn't really the right answer, in any case.