An analysis of the errors in optical constants obtained from reflectance measurements