It appears that these functions are trying to provide rounding rather than truncation to divide a positive number a by 2 by a power of b. If you expand these functions for the interviewer, Iβm sure that you explained 2 things to him.
(, , , , , .)
, , *.5 , , 3 :
a = 13, b = 3: r2 = > 2, r3 = > 2: 13/2 ^ 3 = 1.625
a = 12, b = 3: r2 = > 2, r3 = > 1:12/2 ^ 3 = 1,5
a = 11, b = 3: r2 = > 1, r3 = > 1:11/2 ^ 3 = 1.375
( , , , . , " c skilz" .)