CLHEP 2.4.7.1
C++ Class Library for High Energy Physics
Legendre.icc
Go to the documentation of this file.
1// -*- C++ -*-
2// $Id:
3#include "gsl/gsl_sf_legendre.h"
4#include <cmath>
5#include <signal.h>
6#include <assert.h>
7
8
9namespace Genfun {
10
11 FUNCTION_OBJECT_IMP(Legendre)
12
13 inline
14 Legendre::Legendre(unsigned int order):
15 _order(order)
16 {
17 }
18 inline
21 inline
23 _order(right._order)
24 {
25 }
26
27
28 inline
29 double Legendre::operator() (double x) const {
30 gsl_sf_result result;
31 int status = gsl_sf_legendre_Pl_e(_order,x, &result);
32 if (status!=0) {
33 std::cerr << "Warning, GSL function gsl_sf_legendre_e"
34 << " return code" << status << std::endl;
35 raise(SIGFPE);
36 }
37 return result.val;
38 }
39
40} // end namespace Genfun
#define FUNCTION_OBJECT_IMP(classname)
virtual ~Legendre()
Definition Legendre.icc:19
Legendre(unsigned int order)
Definition Legendre.icc:14
virtual double operator()(double argument) const override
Definition Legendre.icc:29
Definition Abs.hh:14