Re: Re: FromDigits[{135,21}] -> 1371 (??!!)
- To: mathgroup at smc.vnet.net
- Subject: [mg53776] Re: [mg53763] Re: FromDigits[{135,21}] -> 1371 (??!!)
- From: DrBob <drbob at bigfoot.com>
- Date: Thu, 27 Jan 2005 05:41:12 -0500 (EST)
- References: <ct561v$e8b$1@smc.vnet.net> <200501260937.EAA00274@smc.vnet.net>
- Reply-to: drbob at bigfoot.com
- Sender: owner-wri-mathgroup at wolfram.com
FromDigits is a handy way to multiply by powers and sum... regardless of what the coefficients may be. For instance: FromDigits[{x, y}] 10*x + y or FromDigits[{1/2, -1}, x] x/2 - 1 If we want the function to handle symbolic inputs (and why not?), I see no benefit from limiting the coefficients. At most, FromDigits might benefit from a more general name, such as PolynomialExpand. "FromDigits" does express its most common use, I think. Bobby On Wed, 26 Jan 2005 04:37:40 -0500 (EST), Astanoff <astanoff at yahoo.fr> wrote: >> Can anyone please explain what happens, >> if "Digits" actually are "integers": >> FromDigits[{3,2}] >> 32(!) >> FromDigits[{13,2}] > > Digit : "One of the ten Arabic number symbols, 0 through 9, > or such a symbol used in a system of numeration". > So, without any base specified, FromDigits[{13,2}] > assumes default base 10 and should output an error message. > Imho, that's a bug. > > v.a. > > > > -- DrBob at bigfoot.com www.eclecticdreams.net
- References:
- Re: FromDigits[{135,21}] -> 1371 (??!!)
- From: "Astanoff" <astanoff@yahoo.fr>
- Re: FromDigits[{135,21}] -> 1371 (??!!)