00001 00002 /*--------------------------------------------------------------------------- 00003 E.S.O. 00004 ---------------------------------------------------------------------------- 00005 File name : ipow.h 00006 Author : N. Devillard 00007 Created on : June 1999 00008 Language : ANSI C 00009 Description : integer powers 00010 *--------------------------------------------------------------------------*/ 00011 00012 /* 00013 00014 $Id: ipow.h,v 1.1 2003/09/03 12:50:47 amodigli Exp $ 00015 $Author: amodigli $ 00016 $Date: 2003/09/03 12:50:47 $ 00017 $Revision: 1.1 $ 00018 00019 */ 00020 00021 #ifndef _IPOW_H_ 00022 #define _IPOW_H_ 00023 00024 00025 /*--------------------------------------------------------------------------- 00026 Function prototypes 00027 ---------------------------------------------------------------------------*/ 00028 00029 /*--------------------------------------------------------------------------- 00030 Function : ipow() 00031 In : double, int 00032 Out : double 00033 Job : same as pow(x,y) but for integer values of y 00034 Notice : much faster than the math function due to the integer. 00035 On some compilers, this optimization is already done in 00036 the pow() function, we do not rely on that fact. 00037 ---------------------------------------------------------------------------*/ 00038 double ipow(double x, int p); 00039 00040 #endif
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001