How can I implement the following function:
in C#?
Thanks.
How can I implement the following function:
in C#?
Thanks.
440 * 12th root of 2 raised to n-49
= 440 * (2 ^ 1/12) ^(n-49)
= 440 * 2^(n/12) / 2^(49/12)
= 440 * 2^(n/12) / (2^4 * 2^1/12)
= 440 * ( 1 / 2^4 ) * 2^((n-1) /12)
= 8 * 55 * ( 1/16 ) * 2^((n-1) /12)
= 27.5 * 2^((n-1) /12)
so ....
double d = 27.5 * Math.Pow(2, (n-1) / 12.0)
And since 12th root of 2 = 1.0594630943592952645618252949463, then
double d = 27.5 * Math.Pow(1.0594630943592952645618252949463, (n-1))
so...
double d = 27.5 * Math.Pow(1.059463094359295, (n-1));