resample: support double precission resampling