Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:00:59

0001 /* gsl_pow_int.h
0002  * 
0003  * Copyright (C) 1996, 1997, 1998, 1999, 2000, 2004, 2007 Gerard Jungman, Brian Gough
0004  * 
0005  * This program is free software; you can redistribute it and/or modify
0006  * it under the terms of the GNU General Public License as published by
0007  * the Free Software Foundation; either version 3 of the License, or (at
0008  * your option) any later version.
0009  * 
0010  * This program is distributed in the hope that it will be useful, but
0011  * WITHOUT ANY WARRANTY; without even the implied warranty of
0012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0013  * General Public License for more details.
0014  * 
0015  * You should have received a copy of the GNU General Public License
0016  * along with this program; if not, write to the Free Software
0017  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
0018  */
0019 
0020 #ifndef __GSL_POW_INT_H__
0021 #define __GSL_POW_INT_H__
0022 #include <gsl/gsl_inline.h>
0023 
0024 #undef __BEGIN_DECLS
0025 #undef __END_DECLS
0026 #ifdef __cplusplus
0027 # define __BEGIN_DECLS extern "C" {
0028 # define __END_DECLS }
0029 #else
0030 # define __BEGIN_DECLS /* empty */
0031 # define __END_DECLS /* empty */
0032 #endif
0033 
0034 __BEGIN_DECLS
0035 
0036 INLINE_DECL double gsl_pow_2(const double x);
0037 INLINE_DECL double gsl_pow_3(const double x);
0038 INLINE_DECL double gsl_pow_4(const double x);
0039 INLINE_DECL double gsl_pow_5(const double x);
0040 INLINE_DECL double gsl_pow_6(const double x);
0041 INLINE_DECL double gsl_pow_7(const double x);
0042 INLINE_DECL double gsl_pow_8(const double x);
0043 INLINE_DECL double gsl_pow_9(const double x);
0044 
0045 #ifdef HAVE_INLINE
0046 INLINE_FUN double gsl_pow_2(const double x) { return x*x;   }
0047 INLINE_FUN double gsl_pow_3(const double x) { return x*x*x; }
0048 INLINE_FUN double gsl_pow_4(const double x) { double x2 = x*x;   return x2*x2;    }
0049 INLINE_FUN double gsl_pow_5(const double x) { double x2 = x*x;   return x2*x2*x;  }
0050 INLINE_FUN double gsl_pow_6(const double x) { double x2 = x*x;   return x2*x2*x2; }
0051 INLINE_FUN double gsl_pow_7(const double x) { double x3 = x*x*x; return x3*x3*x;  }
0052 INLINE_FUN double gsl_pow_8(const double x) { double x2 = x*x;   double x4 = x2*x2; return x4*x4; }
0053 INLINE_FUN double gsl_pow_9(const double x) { double x3 = x*x*x; return x3*x3*x3; }
0054 #endif
0055 
0056 double gsl_pow_int(double x, int n);
0057 double gsl_pow_uint(double x, unsigned int n);
0058 
0059 __END_DECLS
0060 
0061 #endif /* __GSL_POW_INT_H__ */