I don't understand what you're doing, and the pdf you posted doesn't appear to contain an algorithm. It's not at all clear to me where the numbers you post come from, and in any case they're too small for me to figure out what calculations they could result from. I asked for an example with a somewhat larger number so I could follow it more easily but you weren't able to give it.
Until you know what you're doing there is no hope of someone else implementing it for you.
|