Thanks for the clarification. I've spent a lot of time writing code so I'm more likely to have been exposed to it that way. Having said that, the things I've written have never really needed anything remotely clever mathematically. I can honestly say I don't think I've ever consciously used log(x), ln(x) or any variant thereof - or if I have they've been hidden away in other functions.
Originally, at this point in the post I had typed out in detail the problems that I was having with obtaining R1. I stepped through both calculations in full and showing my results, in the hope of asking for help. In the process, I realised where I had been going wrong! So, by virtue of the fact that I was typing a reply to your post when I solved my second problem, I shall give you credit for that as well!