On Wednesday, 21 September 2016 at 08:21:29 UTC, Basile B. wrote:
On Wednesday, 21 September 2016 at 01:34:06 UTC, Nicholas Wilson wrote:
On Tuesday, 20 September 2016 at 12:35:18 UTC, Basile B. wrote:

So if we rearrange and take the logs of both sides and divide by c we get

2*log(1-y)/c = log(1-2^(-2/c))

and then that we have one occurrence of c on each side do an iterative back substitution to find the intersection given that you know for y=0.5 ,c = 2. We used this method for finding voltages and currents in circuits with semiconductors.

Y is a floating point value. I think I'm gonna make a LUT for let's say 100 values to find the initial range where the result stands.

What does Y being float have to do with this? LUT is a good idea, a round number like 64 or 128 (or even 32) is probably better.

then do
g = 2*log(1-y);//constant
c(n+1) = g/log(1-2^(-2/c(n)))
where c(1) is a guess from the LUT.
the iteration should converge very fast.

Reply via email to