[Jprogramming] Drop trailing zeros in a number
Roger Hui
rogerhui.canada at gmail.com
Sun Nov 6 00:49:31 HKT 2011
Use methods that don't depend on the vagaries of formatting. For example:
120^40x
146977156796908645058275555501504261269749760000000000000000000000000000000000000000
%&10^:(0=10|])^:_ ] 120^40x
14697715679690864505827555550150426126974976
2011/11/5 Richard Donovan <rsdonovan at hotmail.com>
>
>
>
> > ". |. ":". |. 22": 123450245000
> > 123450245
> >
> >
>
> But...
>
>
>
> ". |. ":". |. 22": 123450245010
>
> |ill-formed number
>
> | ".|.":".|.22":1.2345e11
>
>
>
> > 2011/9/18 Raul Miller <rauldmiller at gmail.com>
> >
> > > On Sat, Sep 17, 2011 at 5:05 PM, David Vaughan
> > > <purpleblues13 at googlemail.com> wrote:
> > > > Hi, how could I drop trailing zeros from a number? e.g. 123450245000
> > > becomes
> > > > 123450245
> > >
> > > |.&.":^:2: 123450245000
> > > 123450245
>
More information about the Programming
mailing list