Non-integer bases

Python 3, 151 134 121 120 bytes

import math
def f(n,b,l,r=''):
 for i in range(int(math.log(n,b)),-l-1,-1):r+="%i"%(n/b**i)+'.'*(0==i);n%=b**i
 return r

Try it online!

Returns a string of the non-integer base representation. This can probably be golfed more; stay tuned.


Special thanks to:

  • @LeakyNun for saving 13 bytes!
  • @Zacharý for saving 1 byte!

Mathematica, 85 bytes

(r=RealDigits[#,#2,9#3];k=r[[2]];s=ToString/@r[[1]];""<>s[[;;k]].""<>s[[k+1;;k+#3]])&

Mathematica, 86 bytes

(s=TakeDrop@##&@@RealDigits[#,#2,9#3];FromDigits@s[[1]].""<>ToString/@s[[2]][[;;#3]])&

input

[450,E,6]