what is the range of the km and mp you need?

If up to 105 Km is OK with you then a word size variable can do it I think.

105(km)*621=65205. Scaling by 100 gives 65.205 Miles.

Or 65205/621 gives back Km. Also if the Miles are scaled up by a factor of 100.

Ioannis