Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #5436

Re: count zeros in a number

From DrMajorBob <btreat1@austin.rr.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: count zeros in a number
Date 2011-10-06 08:32 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <j6jp2t$mbh$1@smc.vnet.net> (permalink)
References <j69104$rda$1@smc.vnet.net> <j6e5ti$kbr$1@smc.vnet.net>

Show all headers | View raw


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@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@yahoo.com

Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

count zeros in a number dimitris <dimmechan@yahoo.com> - 2011-10-02 06:40 +0000
  Re: count zeros in a number DC <b.gatessucks@gmail.com> - 2011-10-03 08:20 +0000
  Re: count zeros in a number Mark Adler <madler@alumni.caltech.edu> - 2011-10-03 08:22 +0000
  Re: count zeros in a number Peter Pein <petsie@dordos.net> - 2011-10-03 08:29 +0000
  Re: count zeros in a number Peter Breitfeld <phbrf@t-online.de> - 2011-10-03 08:30 +0000
  Re: count zeros in a number "Dr. Wolfgang Hintze" <weh@snafu.de> - 2011-10-03 08:28 +0000
  Re: count zeros in a number Stefan Salanski <wutchamacallit27@gmail.com> - 2011-10-04 05:34 +0000
    Re: count zeros in a number Richard Fateman <fateman@cs.berkeley.edu> - 2011-10-05 08:14 +0000
      Re: count zeros in a number -> Clip[x] = ? "Dr. Wolfgang Hintze" <weh@snafu.de> - 2011-10-06 08:35 +0000
      Re: count zeros in a number Mark Adler <madler@alumni.caltech.edu> - 2011-10-06 08:40 +0000
    Re: count zeros in a number DrMajorBob <btreat1@austin.rr.com> - 2011-10-06 08:32 +0000
  Re: count zeros in a number DrMajorBob <btreat1@austin.rr.com> - 2011-10-04 05:35 +0000
  Re: count zeros in a number dimitris <dimmechan@yahoo.com> - 2011-10-04 05:30 +0000

csiph-web