~ubuntu-branches/debian/sid/gsl/sid

« back to all changes in this revision

Viewing changes to sys/pow_int.c

  • Committer: Bazaar Package Importer
  • Author(s): Dirk Eddelbuettel
  • Date: 2008-12-16 06:17:55 UTC
  • mfrom: (1.3.2 upstream) (3.1.15 jaunty)
  • Revision ID: james.westby@ubuntu.com-20081216061755-9la7p0qwrhopk8pl
Tags: 1.12+dfsg-1
* New upstream version released today

* doc/*: As before, removed the 'non-free' documentation to create a 
  source package that complies with Debian's interpretation of what is free. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 */
19
19
#include <config.h>
20
20
#include <math.h>
 
21
 
 
22
/* Compile all the inline functions */
 
23
 
 
24
#define COMPILE_INLINE_STATIC
 
25
#include "build.h"
21
26
#include <gsl/gsl_pow_int.h>
22
27
 
23
 
#ifndef HIDE_INLINE_STATIC
24
 
double gsl_pow_2(const double x) { return x*x;   }
25
 
double gsl_pow_3(const double x) { return x*x*x; }
26
 
double gsl_pow_4(const double x) { double x2 = x*x;   return x2*x2;    }
27
 
double gsl_pow_5(const double x) { double x2 = x*x;   return x2*x2*x;  }
28
 
double gsl_pow_6(const double x) { double x2 = x*x;   return x2*x2*x2; }
29
 
double gsl_pow_7(const double x) { double x3 = x*x*x; return x3*x3*x;  }
30
 
double gsl_pow_8(const double x) { double x2 = x*x;   double x4 = x2*x2; return x4*x4; }
31
 
double gsl_pow_9(const double x) { double x3 = x*x*x; return x3*x3*x3; }
32
 
#endif
33
 
 
34
28
double gsl_pow_int(double x, int n)
35
29
{
36
30
  double value = 1.0;