An algorithm for converting a base-10 number to a base-N number

前端 未结 8 1782
有刺的猬
有刺的猬 2020-12-17 20:37

I am looking for a way to convert a base-10 number into a base-N number where N can be large. Specifically i am looking at converting to base-85 and back again. Does anyone

8条回答
  •  遥遥无期
    2020-12-17 21:11

    Fixnum#to_s won't help you, as it only goes up to base 36.

    I'm surprised that you're going up to base 85. Can you explain how radixs work?

提交回复
热议问题