Sort:  

You call it overcomplicated but it's actually the most common way of describing decay: using a decay constant. At least where I have used it before. Yours describes it using the half life time. I guess it's a matter of taste or field of use?

https://en.wikipedia.org/wiki/Half-life has them explained.

What I see they use on wikipedia page you linked exactly the same form I've used above.
Basically, what I expect, one software engineer forgot at one point that for x>0 (what is the case) e^(ln(x)) = x.

Why to calculate logarithm from 2, then e to power of ln(2) to find it is 2 you knew from the beginning?

Instead of

  • 2 + 2 = 4

They wrote something like:

  • e^(ln(2)) + e^(ln(2)) = 4

As I said, they are equal. As to why I have no idea. I just know the form the BOINC team uses is a form I encounter more than what you showed.

As for the computation. This is what I tell my team all the time: there are two rules to optimize an application:

  • don’t do it;
  • (for experts only!) don’t do it yet.

In code they don't use ln(2) but the result, a constant. I have no idea how a compiler would optimize what you propose or what is in the BOINC code, neither do I have an idea how the floating point unit would handle them.

That said, your comment can be helpful to others, that's why I upvoted it ;-)

Coin Marketplace

STEEM 0.17
TRX 0.15
JST 0.028
BTC 57912.63
ETH 2348.79
USDT 1.00
SBD 2.37