------------------------------------------------------------------------ IMSL Name: PRIME (Single precision version) Revised: June 10, 1991 Purpose: Decompose an integer into its prime factors. Usage: CALL PRIME (N, NPF, IPF, IEXP, IPW) Arguments: N - Integer to be decomposed. (Input) NPF - Number of different prime factors of ABS(N). (Output) If N is equal to -1, 0, or 1, NPF is set to 0. IPF - Integer vector of length 13. (Output) IPF(I) contains the prime factors of the absolute value of N, for I = 1,...NPF. The remaining 13-NPF locations are not used. IEXP - Integer vector of length 13. (Output) IEXP(I) is the exponent of IPF(I), for I = 1,..., NPF. The remaining 13-NPF locations are not used. IPW - Integer vector of length 13. (Output) IPW(I) contains the quantity IPF(I)**IEXP(I), for I = 1,..., NPF. The remaining 13-NPF locations are not used. Remark: The output from PRIME should be interpreted in the following way: ABS(N) = IPF(1)**IEXP(1)*.... *IPF(NPF)**IEXP(NPF). Keyword: Utilities GAMS: A6c; B Chapter: MATH/LIBRARY Utilities Page No.: MATH/LIBRARY User's Manual page 1333