The accuracy of the Young and Verhagen formula for waves in water of finite depth