When I multiply the number \num by \k, it isn't really multiplying \num by an integer. It's apparently not even multiplying \num by 1.0, 2.0, etc.
I'm not quite sure how I'm going to handle something like \num=0.3333333, but so far the only values of \num I can get this to work on end in .0, .5, and .25 due to the inaccuracy. Using round() or int() doesn't seem to make any difference.