[Jprogramming] Drop trailing zeros in a number

Richard Donovan rsdonovan at hotmail.com
Sat Nov 5 07:44:23 HKT 2011


> Date: Sat, 17 Sep 2011 22:39:42 -0400
> From: devonmcc at gmail.com
> To: programming at jsoftware.com
> Subject: Re: [Jprogramming] Drop trailing zeros in a number
> 
> Try putting "x" at the end of the long number to retain precision:
> 
>     |.&.":^:2: 123450245000x
> 
> This is a cute trick.
> 

Not always!!!

   |.&.":^:2: 123450245060x
|ill-formed number
|       |.&.":^:2:123450245060


   |.&.":^:2: 123450245000000000001x
20

   |.&.":^:2: 1234502450000000000010x
20
 		 	   		  


More information about the Programming mailing list