fixed #18, diff won't throw an error at NaN or Inf values any longer.