MathGroup Archive 2011

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

Search the Archive

Re: count zeros in a number

  • To: mathgroup at smc.vnet.net
  • Subject: [mg121903] Re: count zeros in a number
  • From: DrMajorBob <btreat1 at austin.rr.com>
  • Date: Thu, 6 Oct 2011 04:22:35 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <j69104$rda$1@smc.vnet.net> <j6e5ti$kbr$1@smc.vnet.net>
  • Reply-to: drmajorbob at yahoo.com

It would be silly for Stefan not to mention IntegerExponent because it is  
"esoteric", when he instantly makes it LESS esoteric by showing it to us.

Bobby

On Wed, 05 Oct 2011 03:03:18 -0500, Richard Fateman  
<fateman at cs.berkeley.edu> wrote:

> On 10/3/2011 10:34 PM, Stefan Salanski wrote:
>
>>
>> All these solutions are very interesting, and they all work, but I
>> believe the simplest solution is actually a built in function,
>> specifically: IntegerExponent[].
>> IntegerExponent[n,b] returns the highest power of b which divides n,
>> which for b=10, is the number of trailing zeroes of n.
>>
> why yes, all you need is one esoteric function.
> Proof that it is esoteric?  All the previous posters (me too) were
> unaware of it. And presumably all the people who read the question and
> did not post anything ...
>
>
> The first example in the documentation illustrates exactly this usage.
>
> RJF
>
>


-- 
DrMajorBob at yahoo.com



  • Prev by Date: Exporting Polygons to DXF
  • Next by Date: Re: count zeros in a number -> Clip[x] = ?
  • Previous by thread: Re: count zeros in a number
  • Next by thread: Simple fractal