Re: getting BEY from YTM, you need to compound backward to 6 months from the YTM rate and then double this for your BEY.
From your formula (2(1+X)^.05)-1 ; I read this as two times the semi-annual yield to maturity, which is the same as what I was trying to say in my first post. I apologise if I wasn’t clear about it.
HPY X 365/T - Do you mean [(1+HPY)^(365/t)] - 1. If so this the formula for EAY.