PRO calculate_integer_powers_of_scalar, x, power_vec, xpowers, status
; Description: This module calculates the scalar number "x" raised to a set of integer powers defined
; by "power_vec". The vector of numbers representing the different powers of "x" is
; returned via the parameter "xpowers".
;
; N.B: Negative powers of zero are undefined. Hence, if the set of integer powers
; includes any negative powers, then "x" must be non-zero. This module checks that
; all powers of "x" are properly defined, and will fail by returning a "status" of
; "0" if this is not the case.
;
; Input Parameters:
;
; x - FLOAT/DOUBLE - A scalar number for which the set of integer powers is to be calculated.
; power_vec - INTEGER/LONG VECTOR - A one-dimensional vector of length "npowers" containing the set
; of integer powers to which "x" is to be raised.
;
; Output Parameters:
;
; xpowers - DOUBLE VECTOR - A one-dimensional vector of length "npowers" containing the requested
; set of integer powers of "x".
; status - INTEGER - If the module successfully creates the vector of integer powers of "x", then
; "status" is returned with a value of "1", otherwise it is returned with a
; value of "0".
;
; Author: Dan Bramich (dan.bramich@hotmail.co.uk)
;
; History:
;
; 05/12/2010 - Module created (dmb).
;Set the default output parameter values
;Check that "x" is a scalar number of the correct number type
;Check that "power_vec" is a one-dimensional vector of the correct number type
;Check that if "x" is zero, then there are no negative powers in the set of integer powers
;Calculate the set of integer powers of "x"
;Set "status" to "1"