The proposed solution is crazy. Logarithms are extremely expensive to compute. No way is this code more efficient than the loop it "replaced".
That there then are numeric stability issues and a pretty gross fudge factor is used to fix them worsens the situation. I would have a quiet word with any programmer I worked with that came up with this "solution".
That there then are numeric stability issues and a pretty gross fudge factor is used to fix them worsens the situation. I would have a quiet word with any programmer I worked with that came up with this "solution".