MathGroup Archive 2005

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: FromDigits[{135,21}] -> 1371 (??!!)

  • To: mathgroup at smc.vnet.net
  • Subject: [mg53743] Re: FromDigits[{135,21}] -> 1371 (??!!)
  • From: "Jens-Peer Kuska" <kuska at informatik.uni-leipzig.de>
  • Date: Wed, 26 Jan 2005 04:36:18 -0500 (EST)
  • Organization: Uni Leipzig
  • References: <ct561v$e8b$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

myFromDigits[lst_] := FromDigits[Flatten[( IntegerDigits /@ {lst})]]

Regards
  Jens

"Zak Seidov" <seidovzf at yahoo.com> schrieb im Newsbeitrag 
news:ct561v$e8b$1 at smc.vnet.net...
> Can anyone please explain what happens,
> if "Digits" actually are "integers":
> FromDigits[{3,2}]
> 32(!)
> FromDigits[{13,2}]
> 132 (!!)
> FromDigits[{135,2}],
> 1352 (!!!)
> FromDigits[{1355078,9}]
> 13550789 (!!!!!!!)
> it's OK above,
> but:
> FromDigits[{135,21}]
> 1371 (??!!)
> FromDigits[{13,23}]
> 153 (??!!)
> FromDigits[{3,23}]
> 53 (??!!)
>
> And how to get integer 1323 from  list {13,23}?
>
> So, or there is a better way:
> li={135,42};FromDigits[Flatten[{IntegerDigits[li[[1]]],IntegerDigits[li[[2]]]}]]->
> 13542
>
> Many thanks,
> and if you please send copy to
> seidovzf at yahoo.com
> Zak
>
> PS I use M4.
> M5 also gives
> FromDigits[{135,21}]
> 1371 (??!!)
> 



  • Prev by Date: Re: Form of a linear equation
  • Next by Date: Latex + Mathematica EPS file problems
  • Previous by thread: Re: FromDigits[{135,21}] -> 1371 (??!!)
  • Next by thread: Re: FromDigits[{135,21}] -> 1371 (??!!)