>  Docs Center  >  Libraries  >  JHU/APL/S1R  >  NUMFACTORS

NUMFACTORS

NUMFACTORS

Name


      NUMFACTORS

Purpose


      Gives the number of factors of a number.

Category


Calling Sequence


      nf = numfactors(x)

Inputs


      x = number to factor. in

Keyword Parameters


Keywords


        /QUIET do not list factors.
        PROGRESS=n Indicate progress every n values (for arrays).

Outputs


      nf = number of factors of x. out
        Does not include 1 and x.

Common Blocks


Notes


      Note: let the factors of x be described by p, the array
        of prime factors, and n, the count of each prime factor.
        The i'th prime factor, p(i), may occur from 0 to n(i)
        times (that is, up to n(i)+1 times) in any given factor
        of x. The total number of factors is the product of the
        maximum number of occurences of each prime factor.
        For example: let n = [3,1,1], then the total number of
        factors, nf = 4*2*2. To include 1 and x add 2.
        (From a conversation with Robert Jensen, JHU/APL.)
        See also prime, factor, print_fact.

Modification History


      R. Sterner, 25 Oct, 1990
      R. Sterner, 26 Feb, 1991 --- Renamed from num_factors.pro
      R. Sterner, 5 Feb, 1993 --- Modified to handle arrays.
      R. Sterner, 2000 Jan 06 --- Added /QUIET.
      R. Sterner, 2004 Jul 27 --- Fixed a typo in help text.
      R. Sterner, 2010 Jun 09 --- Converted arrays from () to [].
  Copyright (C) 1990, Johns Hopkins University/Applied Physics Laboratory
  This software may be used, copied, or redistributed as long as it is not
  sold and this copyright notice is reproduced on each copy made. This
  routine is provided as is without any express or implied warranties
  whatsoever. Other limitations apply as described in the file disclaimer.txt.



© 2019 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us