Compila ?

Veramente manca l'include di

math.h

per la sqrt e il valore restituito dalla funzione

double filter_vector

(dato che è una funzione double, quale valore restituisce? Non c'è return ...)