You should uses a debugger and also a pen and a paper.
Do each step on the paper and trace the corresponding code. As soon as the result differ, you will have an idea of what was used and what you get.
The first problem with your code is that you always uses 12.34 for fNum... thus the fractional part is always 12 in base a.
For 10.5 and 2, you get: 12 = 1x8 + 1x4 + 0x2 + 0x1 = 1100
For 3.828 and 3, you get: 12 = 1x9 + 1x3 + 1x0 = 110
For 82.7593 and 9, you get: 12 = 1x9 + 3%9 = 13
For 7218.8192 and 11, you get: 11 = 1x11 + 1%11 = 11
For 8273.8 and 15, you get: 12 = 12%15 = C
As mentionned in your other duplicate question, one way to handle that would be to multiply the fractional part...
For 10.5 and 2, you get for the fractional part:
0.5 * 2 = 1 ; 1 % 2 => 1 ; no more fractional part
For 3.827 and 3, you get for the fractional part:
0.827 * 3 = 2.481 ; 2 % 3 => 2
0.481 * 3 = 1.443 ; 1 % 3 => 1
0.443 * 3 = 1.329 ; 1 % 3 => 1
0.329 * 3 = 0.987 ; 0 % 3 => 0
0.987 * 3 = 2.961 ; 2 % 3 => 2
0.961 * 3 = 2.883 ; 2 % 3 => 2
0.883 * 3 = 2.649 ; 2 % 3 => 2
...
In that case, you would stop when you have desired precision...