MathGroup Archive 2008

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

Search the Archive

Re: Is there a simple way to transform 1.1 to 11/10?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg92984] Re: [mg92968] Is there a simple way to transform 1.1 to 11/10?
  • From: Alain Cochard <alain at geophysik.uni-muenchen.de>
  • Date: Wed, 22 Oct 2008 05:37:12 -0400 (EDT)
  • References: <200810211024.GAA04964@smc.vnet.net>
  • Reply-to: alain at geophysik.uni-muenchen.de

Andrzej Kozlowski writes:
 > I think this will do it:
 > 
 > ff[z_] := With[{w = RealDigits[z]},FromDigits[MapAt[# /. {x___, a_ /;  
 > a != 0, 0 ...} :> {x, a} &, w, 1]]]

Yes, it seems to.  Thank you so much!  (although I asked for a
*simple* way :-)


  • Prev by Date: Re: A Dynamic mess
  • Next by Date: Re: Is there a simple way to transform 1.1 to 11/10?
  • Previous by thread: Is there a simple way to transform 1.1 to 11/10?
  • Next by thread: Re: Is there a simple way to transform 1.1 to 11/10?