I think the formula is correct as it stands. You can check it out on some test data eg: loan of 1 million for 20 years @ 10% monthly. Formula gives half life as 14.34 years: near as d.. to 172 months and using Excel's PV function for the remainder (68 months) we are a tad short of half way at 499401.52. With the minus sign in we get -5.66 years - oh dear! Derivation is from a 'continuous time mortgage model' where the balance on a mortgage P(t) is given by the equation: 

r=interest rate, T=time period of loan and P0 is the original loan amount. Once again this is something I have derived for myself but no doubt also once again there are more authoritative sources.