23#include<gsl/gsl_math.h>
60 double const PI = M_PI;
64 double const PI_2 = M_PI_2;
68 double const PI_4 = M_PI_4;
88 double const LN10 = M_LN10;
92 double const LN2 = M_LN2;
96 double const LNPI = M_LNPI;
118 inline bool is_even( T
const&
n ){
return not (
n & 1); }
127 inline short sign( T
const& x ){
return x >= 0 ? 1 : -1; }
135 inline int is_real(
double const x ){
return gsl_finite( x ); }
double const EULER
Euler's constant.
size_t n(workspace const &w)
C++ version of gsl_rstat_n().
The gsl package creates an interface to the GNU Scientific Library for C++.
int is_real(double const x)
Variation on gsl_finite: returns 1 for a real number, 0 for infinite or NaN.
bool is_odd(T const &n)
Check if odd: only really makes sense for integral types.
bool is_even(T const &n)
Check if even: only really makes sense for integral types.
short sign(T const &x)
Find the sign of x: returns +1 for a value of zero to be consistent with GNU Scientific Library.