function for relativistic correction