/* * File: * expt.h * Author: * Samuel A. Rebelsky * Version: * 1.0 of March 2003. * Summary: * A header file for a simple implementation of exponentiation. */ #ifndef _EXPT_H_ #define _EXPT_H_ /* * Procedure: * expt * Parameters: * val, a double * power, a non-negative integer * Purpose: * Compute val^power. * Produces: * result, a double. * Preconditions: * power >= 0. * val^power is representable. * Postconditions: * result = val^power. */ double expt(double val, int power); #endif /* _EXPT_H_ */