up previous next
FactorMultiplicity

multiplicity of a factor of an integer
Syntax

FactorMultiplicity(N:INT, Fac:INT):INT


Description
This function counts how many times a give factor divides a given integer. Obviously Fac must not be -1, 0, or 1, and N must not be zero.

Example
  FactorMultiplicity(20, 2);
2
-------------------------------
  FactorMultiplicity(20, 10);
1
-------------------------------
  FactorMultiplicity(20, 7);
0
-------------------------------