> So you'd basically need a sub that takes a List, and a base factor, and does the necessary arithmetic for you. I don't think that's in core.
If that were to exist, would that be an inverse of "polymod"- maybe "polymul"? - with this property @decomposed-num = $some_number.polymod(@a-sequence) if and only if $some_number = @decomposed-num.polymul(@a-sequence) -y On Fri, Oct 30, 2020 at 2:19 PM Elizabeth Mattijsen <l...@dijkmat.nl> wrote: > > On 30 Oct 2020, at 22:11, Sean McAfee <eef...@gmail.com> wrote: > > > > Sorry, it seems I wasn't explicit enough. > > > > With polymod, I can get the values of digits even in large bases like > 101: > > > > > 1234567890.polymod(101 xx *) > > (46 20 26 87 11) > > > > Given a list of digit values like that, and the base, I want to > reconstruct the original number. One way would be the one I originally > suggested: > > > > > sum <46 20 26 87 11> Z* (1, * * 101 ... *) > > 123456789 > > > > ...but I'm hoping there's something more concise, shorter, and/or > readable. > > Ah, so it's not about parsing per se. Sorry I misunderstood. > > So you'd basically need a sub that takes a List, and a base factor, and > does the necessary arithmetic for you. I don't think that's in core. I'd > be glad if someone proved me wrong :-) > > > > Liz